Installing a XSender application on an Nginx server typically involves the following steps:
Install Nginx and PHP: You can install Nginx and PHP on your server using the following command:
sudo apt-get update sudo apt-get install nginx php-fpm php-mysqlConfigure Nginx: After installing Nginx, you need to configure it to serve your XSender application. Create a new configuration file in the /etc/nginx/sites-available/ directory, for example:
sudo nano /etc/nginx/sites-available/myapp
Paste the following configuration into the file, replacing example.com with your domain name and /var/www/myapp/public with the path to your XSender application's public directory:
server { listen 80; server_name example.com; root /var/www/myapp/public; index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \\\\.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\\\\.ht {
deny all;
}
Save and exit the file, and then create a symbolic link to enable the site:
sudo ln -s /etc/nginx/sites-available/myapp /etc/nginx/sites-enabled/Upload the XSender project zip file to the /var/www/myapp/public directory on your server. You can use a tool like SCP or BitVise to transfer the file from your local machine to the server:
SSH into your server and navigate to the /var/www/myapp/public directory:cd /var/www/myapp/public
Unzip the XSender project zip file using the following command: sudo unzip xsender-project.zip
that is you download from codecanyon sometimes zip file name may be changed. So, Replace xsender-project.zip with the name of your XSender project zip file when it necessary.
Set permissions for the storage and bootstrap/cache directories:
sudo chgrp -R www-data storage bootstrap/cache && sudo chmod -R ug+rwx storage bootstrap/cacheRestart Nginx: sudo systemctl restart nginx
Configure PHP: You may need to modify the PHP configuration to ensure that it meets XSender's requirements. Edit the php.ini file:
sudo nano /etc/php/8.3/fpm/php.iniAnd change the following settings:
memory_limit = 512M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 360
max_input_time = 120Save and exit the file, and then restart the PHP service:
sudo systemctl restart php8.3-fpmInstall Composer and Laravel: If you haven't already, install Composer:
sudo apt-get install composerThen, navigate to the root directory of your Laravel application and run the following command to install Laravel and its dependencies:
composer install --no-devSet Permissions: Make sure that the storage and bootstrap/cache directories are writable by the web server:
sudo chgrp -R www-data storage bootstrap/cache sudo chmod -R ug+rwx storage bootstrap/cacheRestart Nginx: Finally, restart Nginx to apply the changes:
sudo systemctl restart nginxYour application should now be accessible through your domain name or server's IP address.
Here are the steps to install MySQL and create a database named "xsender" for your Laravel application:
Install MySQL: You can install MySQL on your server using the following command:
sudo apt-get install mysql-serverSecure MySQL installation: Run the following command to secure your MySQL installation:
sudo mysql_secure_installationFollow the prompts to set a root password and answer the security questions.
Create a database: Log in to the MySQL server using the root account:
sudo mysql -u root -pEnter the root password when prompted. Then, create a database named "xsender":
CREATE DATABASE xsender;Verify that the database was created successfully by running the following command:
SHOW DATABASES;You should see "xsender" listed among the databases.
Create a user and grant permissions: Create a new user account for your XSender application:
CREATE USER 'xsenderuser'@'localhost' IDENTIFIED BY 'password';Replace "password" with a strong password of your choice.
Grant the user full privileges to the "xsender" database:
GRANT ALL ON xsender.* TO 'xsenderuser'@'localhost';Flush the privileges to apply the changes:
FLUSH PRIVILEGES;Exit the MySQL console:
exit; Now your XSender application is ready to installation process by browse your server ip or domain, and follow this steps:
Installation Process Step
Note:
If you're having difficulty installing the XSender software, please don't hesitate to contact us via a support ticket for installation support. Please note that the installation process may require some minor adjustments depending on your server configuration, and that there may be a charge associated with this service. Our support team will be happy to provide you with further information. Thank you!