<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nickson Elauriche Toho</title>
    <description>The latest articles on DEV Community by Nickson Elauriche Toho (@elaurichenickson).</description>
    <link>https://dev.to/elaurichenickson</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1211456%2F5c2b6aae-a683-45a6-8109-540a47bc7ba6.jpeg</url>
      <title>DEV Community: Nickson Elauriche Toho</title>
      <link>https://dev.to/elaurichenickson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elaurichenickson"/>
    <language>en</language>
    <item>
      <title>How to run PgAdmin4 with Docker</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sat, 23 Dec 2023 13:11:29 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/how-to-run-pgadmin4-with-docker-ke0</link>
      <guid>https://dev.to/elaurichenickson/how-to-run-pgadmin4-with-docker-ke0</guid>
      <description>&lt;p&gt;Running the &lt;code&gt;docker run&lt;/code&gt; command for pgAdmin 4 will start a Docker container with the pgAdmin 4 application. To achieve this, you need to have Docker installed on your system. If you don't have Docker installed, you can download it from the official Docker website: &lt;a href="https://www.docker.com/get-started"&gt;https://www.docker.com/get-started&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a basic &lt;code&gt;docker run&lt;/code&gt; command to start pgAdmin 4:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --name pgadmin-container -p 0.0.0.0:5050:80 -e PGADMIN_DEFAULT_EMAIL=admin@domain.com -e PGADMIN_DEFAULT_PASSWORD=admin -e PGADMIN_LISTEN_ADDRESS=0.0.0.0 -d dpage/pgadmin4

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break down the command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-p 0.0.0.0:5050:80&lt;/code&gt;: This binds the container's port 80 to all available network interfaces on the host machine &lt;code&gt;(0.0.0.0)&lt;/code&gt;. This makes pgAdmin 4 accessible from anywhere.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-e PGADMIN_LISTEN_ADDRESS=0.0.0.0&lt;/code&gt;: This environment variable sets pgAdmin 4 to listen on all available network interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&lt;code&gt;--name my_pgadmin4&lt;/code&gt;: This option gives a custom name ("my_pgadmin4") to the Docker container. You can choose a different name if you prefer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-e PGADMIN_DEFAULT_EMAIL=user@example.com&lt;/code&gt;: This sets the default email for the initial login.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-e PGADMIN_DEFAULT_PASSWORD=admin&lt;/code&gt;: This sets the default password for the initial login.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-d&lt;/code&gt;: This runs the container in detached mode, meaning it runs in the background.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;dpage/pgadmin4&lt;/code&gt;: This is the Docker image for pgAdmin 4. If the image is not already downloaded, Docker will automatically pull it from the Docker Hub.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-After running this command, you should be able to access pgAdmin 4 by opening your web browser and navigating to &lt;code&gt;http://localhost:5050&lt;/code&gt;. Use the email and password specified in the &lt;code&gt;docker run&lt;/code&gt; command to log in.&lt;/p&gt;

&lt;p&gt;Remember to adjust the parameters based on your preferences and requirements. Also, ensure that the chosen port is not already in use on your host machine.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Run MySQL and phpMyAdmin with Docker for Database Management!</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sat, 23 Dec 2023 12:46:24 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/run-mysql-and-phpmyadmin-with-docker-for-database-management-5dob</link>
      <guid>https://dev.to/elaurichenickson/run-mysql-and-phpmyadmin-with-docker-for-database-management-5dob</guid>
      <description>&lt;p&gt;To run MySQL and phpMyAdmin containers with Docker and connect them, you can follow these steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1- Install Docker
&lt;/h2&gt;

&lt;p&gt;Make sure you have Docker installed on your machine. You can download and install Docker from the official website: &lt;a href="https://www.docker.com/"&gt;https://www.docker.com/&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2- Create a Docker Network
&lt;/h2&gt;

&lt;p&gt;Create a Docker network to allow the containers to communicate with each other. This step is optional but helps in connecting containers easily.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker network create mynetwork
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3- Run MySQL Container
&lt;/h2&gt;

&lt;p&gt;Run a MySQL container with the desired configuration. Replace &lt;code&gt;&amp;lt;password&amp;gt;&lt;/code&gt; with your preferred MySQL password.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d - name mysql-container - network=mynetwork -e MYSQL_ROOT_PASSWORD=&amp;lt;password&amp;gt; -p 3306:3306 mysql:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4- Run phpMyAdmin Container
&lt;/h2&gt;

&lt;p&gt;Run a phpMyAdmin container and link it to the MySQL container. Replace &lt;code&gt;&amp;lt;password&amp;gt;&lt;/code&gt; with the MySQL password you set in &lt;strong&gt;Step 3&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; - name phpmyadmin-container - &lt;span class="nv"&gt;network&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mynetwork &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;PMA_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mysql-container &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;PMA_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3306 &lt;span class="nt"&gt;-p&lt;/span&gt; 8080:80 phpmyadmin/phpmyadmin:latest

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5- Access phpMyAdmin
&lt;/h2&gt;

&lt;p&gt;Open your browser and navigate to &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt;. Log in with the MySQL credentials you provided earlier.&lt;/p&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure to replace  with a secure password of your choice.&lt;/li&gt;
&lt;li&gt;You can choose different ports for MySQL and phpMyAdmin if needed.&lt;/li&gt;
&lt;li&gt;The — network flag is used to connect containers to the same network, enabling them to communicate with each other using container names.&lt;/li&gt;
&lt;li&gt;Ensure that the MySQL container is running before starting the phpMyAdmin container.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By following these steps, you should have a running MySQL container and a phpMyAdmin container connected to it. You can manage your MySQL databases using phpMyAdmin through the web interface.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to deploy NextJS app on heroku</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sun, 17 Dec 2023 23:55:04 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/how-to-deploy-nextjs-app-on-heroku-1b4g</link>
      <guid>https://dev.to/elaurichenickson/how-to-deploy-nextjs-app-on-heroku-1b4g</guid>
      <description>&lt;p&gt;To deploy an existing Next.js application to Heroku, you can follow these general steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  1-  Prepare Your Project:
&lt;/h2&gt;

&lt;p&gt;Make sure your Next.js application is set up correctly and is working locally. You should have the necessary project files, including &lt;code&gt;package.json&lt;/code&gt;,&lt;code&gt;pages&lt;/code&gt; folder, and other dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  2- Create a Git Repository:
&lt;/h2&gt;

&lt;p&gt;If your project isn’t already in a Git repository, initialize one by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create &lt;code&gt;a .gitignore&lt;/code&gt; file if you don't have one to exclude unnecessary files from being committed to the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  3- Heroku Account:
&lt;/h2&gt;

&lt;p&gt;Make sure you have a Heroku account and have the Heroku CLI installed. You can sign up for Heroku at &lt;a href="https://www.heroku.com/"&gt;https://www.heroku.com/&lt;/a&gt; and download the Heroku CLI from &lt;a href="https://devcenter.heroku.com/articles/heroku-cli"&gt;https://devcenter.heroku.com/articles/heroku-cli&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4-  Log in to Heroku:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Open a terminal and log in to your Heroku account by running:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5- heroku login
&lt;/h2&gt;

&lt;p&gt;Create a new Heroku app for your project by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku create your-app-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;your-app-name&lt;/code&gt; with the desired name for your app.&lt;/p&gt;

&lt;h2&gt;
  
  
  5- Add Build Scripts:
&lt;/h2&gt;

&lt;p&gt;In your &lt;code&gt;package.json&lt;/code&gt; file, make sure you have the following scripts defined for building and starting your Next.js app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
  "build": "next build",
  "start": "next start"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7- Configure Environment Variables (if needed):
&lt;/h2&gt;

&lt;p&gt;If your app relies on environment variables, you can set them on Heroku by using the &lt;code&gt;heroku config:set&lt;/code&gt; command. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku config:set MY_VARIABLE=value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8- Commit and Push to Heroku:
&lt;/h2&gt;

&lt;p&gt;Commit your changes and push your repository to Heroku:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "Initial commit"
git push heroku master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9- Open Your App:
&lt;/h2&gt;

&lt;p&gt;Once the deployment is complete, you can open your app in the browser by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku open
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your Next.js app should now be deployed to Heroku. Make sure to monitor the deployment process in your terminal for any potential errors. Additionally, remember to set up any necessary database connections or third-party services if your app relies on them, and configure environment variables accordingly on Heroku.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to deploy Laravel application with Nginx on Ubuntu</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sun, 17 Dec 2023 13:02:13 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/how-to-deploy-laravel-application-with-nginx-on-ubuntu-3enm</link>
      <guid>https://dev.to/elaurichenickson/how-to-deploy-laravel-application-with-nginx-on-ubuntu-3enm</guid>
      <description>&lt;p&gt;Deploying a Laravel application with Nginx involves setting up the web server to correctly handle the incoming requests and serve your application. Here’s a step-by-step guide to deploying a Laravel application with Nginx:&lt;/p&gt;

&lt;h2&gt;
  
  
  1- Server setup:
&lt;/h2&gt;

&lt;p&gt;Assuming you have a server with Ubuntu installed, you can start by updating your system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2- Install required software:
&lt;/h2&gt;

&lt;p&gt;Install PHP, Composer, Nginx, and other necessary packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt installcomposer nginx php-fpm php-mysqlphp-json php-mbstring php-xml php-zip php-gd php-curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3- Confire Nginx:
&lt;/h2&gt;

&lt;p&gt;Create an Nginx server block configuration for your Laravel application. Create a new file in the &lt;code&gt;/etc/nginx/sites-available/&lt;/code&gt; directory (you might need to adjust paths and filenames according to your server setup):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Paste the following configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/html/your-laravel-project/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Enable the site configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/laravel /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Test the Nginx configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Restart Nginx:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4- Deploy Laravel Application:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Upload your Laravel application code to the server. You can use SCP, SFTP, or any other method you prefer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set appropriate permissions for the Laravel storage and bootstrap cache directories:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /var/www/your_laravel_app
sudo chown -R www-data:www-data storage bootstrap/cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5- Configure Laravel Environment:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Copy the &lt;code&gt;.env&lt;/code&gt; file and configure it with your production settings:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp .env.example .env
nano .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate an application key:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan key:generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6- Set Up Database:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If your application uses a database, create the database and update your &lt;code&gt;.env&lt;/code&gt;file with the database credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7- Run Migrations:
&lt;/h2&gt;

&lt;p&gt;Run your application’s migrations to set up the database tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run your application’s migrations to set up the database tables:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8- Restart PHP-FPM:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Restart the PHP-FPM service: (Adjust version if necessary)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart php7.4-fpm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>How to deploy wordpress website with nginx and mysql</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sun, 17 Dec 2023 10:12:22 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/how-to-deploy-wordpress-website-with-nginx-and-mysql-1fk7</link>
      <guid>https://dev.to/elaurichenickson/how-to-deploy-wordpress-website-with-nginx-and-mysql-1fk7</guid>
      <description>&lt;p&gt;Deploying a WordPress website with Nginx and MySQL involves several steps. Here’s a step-by-step guide to help you set up and deploy your WordPress site. This guide assumes you have a server or hosting environment where you can install and configure Nginx and MySQL. If you’re using a cloud-based hosting provider, the process may vary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Setup
&lt;/h2&gt;

&lt;p&gt;Set up a server or hosting environment (e.g., AWS, DigitalOcean, or a VPS provider) with your preferred Linux distribution (e.g., Ubuntu, CentOS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Install NGINX
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Update your server’s package list: &lt;code&gt;sudo apt update&lt;/code&gt; (for Ubuntu) or &lt;code&gt;sudo yum update&lt;/code&gt; (for CentOS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install Nginx: &lt;code&gt;sudo apt install nginx&lt;/code&gt; (for Ubuntu) or &lt;code&gt;sudo yum install nginx&lt;/code&gt; (for CentOS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start and enable Nginx: &lt;code&gt;sudo systemctl start nginx&lt;/code&gt; and &lt;code&gt;sudo systemctl enable nginx&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install MySQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Install MySQL Server: &lt;code&gt;sudo apt install mysql-server&lt;/code&gt; (for Ubuntu) or &lt;code&gt;sudo yum install mysql-server&lt;/code&gt; (for CentOS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Secure your MySQL installation by running &lt;code&gt;mysql_secure_installation&lt;/code&gt; and following the prompts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create a MySQL Database and User
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Log in to MySQL: &lt;code&gt;mysql -u root -p&lt;/code&gt; .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new database for your WordPress site: &lt;code&gt;CREATE DATABASE your_db_name;&lt;/code&gt; .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a MySQL user and grant privileges to the database:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;CREATE USER &lt;span class="s1"&gt;'your_username'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt; IDENTIFIED BY &lt;span class="s1"&gt;'your_password'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
GRANT ALL PRIVILEGES ON your_db_name.&lt;span class="k"&gt;*&lt;/span&gt; TO &lt;span class="s1"&gt;'your_username'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
FLUSH PRIVILEGES&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Exit MySQL: &lt;code&gt;EXIT;&lt;/code&gt; .&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install PHP-FPM
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Install PHP and required extensions: &lt;code&gt;sudo apt install php-fpm php-mysql&lt;/code&gt; (for Ubuntu) or &lt;code&gt;sudo yum install php-fpm php-mysql&lt;/code&gt; (for CentOS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure PHP-FPM settings if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  WordPress Installation
&lt;/h2&gt;

&lt;p&gt;Download and extract WordPress to your web server root directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/www/html
&lt;span class="nb"&gt;sudo &lt;/span&gt;wget https://wordpress.org/latest.tar.gz
&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; latest.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Set the correct permissions:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; www-data:www-data /var/www/html/wordpress
&lt;span class="nb"&gt;sudo chmod&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; 755 /var/www/html/wordpress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nginx Configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create an Nginx server block (Virtual Host) configuration for your WordPress site. You can create a new configuration file in &lt;code&gt;/etc/nginx/sites-available/&lt;/code&gt; and symlink it to &lt;code&gt;/etc/nginx/sites-enabled/&lt;/code&gt;. 
Here's a basic configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;server_name&lt;/span&gt; &lt;span class="s"&gt;your_domain.com&lt;/span&gt; &lt;span class="s"&gt;www.your_domain.com&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kn"&gt;root&lt;/span&gt; &lt;span class="n"&gt;/var/www/html/wordpress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;index&lt;/span&gt; &lt;span class="s"&gt;index.php&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="n"&gt;/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;try_files&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt;&lt;span class="n"&gt;/&lt;/span&gt; &lt;span class="n"&gt;/index.php?&lt;/span&gt;&lt;span class="nv"&gt;$args&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt; &lt;span class="sr"&gt;\.php$&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;include&lt;/span&gt; &lt;span class="nc"&gt;snippets/fastcgi-php&lt;/span&gt;&lt;span class="s"&gt;.conf&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_pass&lt;/span&gt; &lt;span class="s"&gt;unix:/var/run/php/php7.4-fpm.sock&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt; &lt;span class="sr"&gt;/\.ht&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;deny&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Test the configuration: &lt;code&gt;sudo nginx -t&lt;/code&gt; .&lt;/li&gt;
&lt;li&gt;Reload Nginx: &lt;code&gt;sudo systemctl reload nginx&lt;/code&gt; .&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  WordPress Configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open your web browser and access your domain. You will see the WordPress setup wizard.&lt;/li&gt;
&lt;li&gt;Follow the instructions to set up your WordPress site, providing the database name, username, and password you created earlier.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  WordPress Plugins and Themes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Customize your site by installing themes and plugins as needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Secure Your Website
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install an SSL certificate to enable HTTPS for your site.&lt;/li&gt;
&lt;li&gt;Implement security best practices, such as using strong passwords, disabling XML-RPC, and regularly updating WordPress and its plugins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After completing these steps, your WordPress website should be up and running with Nginx and MySQL. Don’t forget to regularly update your WordPress installation, themes, and plugins to keep your website secure and functioning correctly.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>nginx</category>
      <category>wordpress</category>
      <category>mysql</category>
    </item>
    <item>
      <title>How to install GLPI on linux server with NGINX</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sun, 17 Dec 2023 04:55:53 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/how-to-install-glpi-on-linux-server-with-nginx-3988</link>
      <guid>https://dev.to/elaurichenickson/how-to-install-glpi-on-linux-server-with-nginx-3988</guid>
      <description>&lt;p&gt;To install GLPI on a Linux server with Nginx, you can follow these steps. GLPI is a free and open-source IT asset management and helpdesk system.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Prepare your server
&lt;/h2&gt;

&lt;p&gt;Ensure that your Linux server is up-to-date and has the necessary components installed. You’ll need a web server (Nginx), PHP, a database server (usually MySQL or MariaDB), and some additional PHP extensions. You can install these packages using your Linux distribution’s package manager (e.g., apt for Debian/Ubuntu or yum for CentOS/RHEL). For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For Debian/Ubuntu
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nginx mysql-server php-fpm php-mysql php-curl php-gd php-ldap php-xml php-mbstring php-zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;For CentOS/RHEL
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum update
&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;nginx mariadb-server php-fpm php-mysql php-curl php-gd php-ldap php-xml php-mbstring php-zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Configure MySQL/MariaDB
&lt;/h2&gt;

&lt;p&gt;Set up a MySQL/MariaDB database and user for GLPI. Replace &lt;code&gt;&amp;lt;db_user&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;db_password&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;db_name&amp;gt;&lt;/code&gt; with your desired values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="nt"&gt;-u&lt;/span&gt; root &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;CREATE DATABASE &amp;lt;db_name&amp;gt;&lt;span class="p"&gt;;&lt;/span&gt;
CREATE USER &lt;span class="s1"&gt;'&amp;lt;db_user&amp;gt;'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt; IDENTIFIED BY &lt;span class="s1"&gt;'&amp;lt;db_password&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
GRANT ALL PRIVILEGES ON &amp;lt;db_name&amp;gt;.&lt;span class="k"&gt;*&lt;/span&gt; TO &lt;span class="s1"&gt;'&amp;lt;db_user&amp;gt;'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
FLUSH PRIVILEGES&lt;span class="p"&gt;;&lt;/span&gt;
EXIT&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Download and Extract GLPI
&lt;/h2&gt;

&lt;p&gt;You can download the latest GLPI version from the official website. Upload the downloaded ZIP file to your server and extract it to your web server’s document root directory. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;unzip glpi-&amp;lt;version&amp;gt;.zip &lt;span class="nt"&gt;-d&lt;/span&gt; /var/www/html/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Set Permissions
&lt;/h2&gt;

&lt;p&gt;Adjust permissions on the GLPI directory to ensure the web server can read and write files as needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; www-data:www-data /var/www/html/glpi/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Create Nginx Server Block
&lt;/h2&gt;

&lt;p&gt;Create an Nginx server block (virtual host) configuration for GLPI. Replace &lt;code&gt;&amp;lt;your_domain&amp;gt;&lt;/code&gt; with your domain name or server IP address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/nginx/sites-available/glpi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following configuration, making sure to adjust the paths and server_name as needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;server_name&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your_domain&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;root&lt;/span&gt; &lt;span class="n"&gt;/var/www/html/glpi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="n"&gt;/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;index&lt;/span&gt; &lt;span class="s"&gt;index.php&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;try_files&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt;&lt;span class="n"&gt;/&lt;/span&gt; &lt;span class="n"&gt;/index.php?&lt;/span&gt;&lt;span class="nv"&gt;$args&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt; &lt;span class="sr"&gt;\.php$&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;include&lt;/span&gt; &lt;span class="nc"&gt;snippets/fastcgi-php&lt;/span&gt;&lt;span class="s"&gt;.conf&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kn"&gt;fastcgi_pass&lt;/span&gt; &lt;span class="s"&gt;unix:/var/run/php/php7.4-fpm.sock&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;# Adjust the PHP-FPM socket path&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kn"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt; &lt;span class="sr"&gt;/\.ht&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kn"&gt;deny&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Enable the Nginx Server Block
&lt;/h2&gt;

&lt;p&gt;Create a symbolic link to your configuration file in the sites-enabled directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /etc/nginx/sites-available/glpi /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Test Nginx Configuration
&lt;/h2&gt;

&lt;p&gt;Check if your Nginx configuration is correct:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-t&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Start Nginx
&lt;/h2&gt;

&lt;p&gt;If the configuration test is successful, restart Nginx to apply the changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9. Finish the Installation
&lt;/h2&gt;

&lt;p&gt;Open a web browser and access your GLPI installation using your server’s domain name or IP address. You should see the GLPI installation wizard. Follow the wizard to complete the installation, providing the database credentials and other required information.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Secure Your Installation (Optional)
&lt;/h2&gt;

&lt;p&gt;After installation, it’s crucial to secure your GLPI instance. Ensure you change the default administrator password and follow GLPI’s security guidelines.&lt;/p&gt;

&lt;p&gt;Your GLPI installation should now be accessible via your web browser and running behind Nginx. Remember to regularly back up your GLPI data and keep the system updated for security purposes.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>devops</category>
      <category>nginx</category>
      <category>glpi</category>
    </item>
    <item>
      <title>Configuring Sendy with NGINX: A Step-by-Step Guide</title>
      <dc:creator>Nickson Elauriche Toho</dc:creator>
      <pubDate>Sat, 18 Nov 2023 17:20:08 +0000</pubDate>
      <link>https://dev.to/elaurichenickson/configuring-sendy-with-nginx-a-step-by-step-guide-3lc3</link>
      <guid>https://dev.to/elaurichenickson/configuring-sendy-with-nginx-a-step-by-step-guide-3lc3</guid>
      <description>&lt;p&gt;Sendy is a powerful and cost-effective self-hosted email marketing solution. To optimize its performance and security, integrating it with NGINX, a high-performance web server, is a smart choice. This article will guide you through the process of configuring Sendy with NGINX.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Prerequisites:&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Before you begin, make sure you have the following:&lt;br&gt;
Sendy project folder downloaded from SENDY on your server.&lt;br&gt;
NGINX installed on your server.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Create NGINX Server Block for Sendy
&lt;/h2&gt;

&lt;p&gt;Navigate to the NGINX sites-available directory. Create a new configuration file for Sendy, for example, sendy.conf.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/sendy.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the following configuration, adjusting the values as needed:&lt;/p&gt;

&lt;p&gt;For configure NGINX without SSL config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
    listen 80;
    server_name your_sendy_domain.com www.your_sendy_domain.com;

    root /var/www/sendy; # Change this to your Sendy installation directory

    index index.php index.html index.htm;
    autoindex off;

    add_header X-Robots-Tag "noindex, noarchive";
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { log_not_found off; access_log off; allow all; }
    location ~ /\.  { deny all; log_not_found off; access_log off; return 404; }

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Adjust the PHP version if needed
        fastcgi_index index.php;
        fastcgi_param   SCRIPT_FILENAME $request_filename;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    location ~* \.(css|js|gif|jpe?g|png)$ {
        expires max;
        log_not_found off;
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location /l/ {
        rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
    }
    location /t/ {
        rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
    }
    location /w/ {
        rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
    }
    location /unsubscribe/ {
        rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
    }
    location /subscribe/ {
        rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
    }
    location /confirm/ {
        rewrite ^/confirm/(.*)$ /confirm.php?i=$1 last;
    }
    location /new-brand {
        rewrite ^/new-brand/?$ /new-brand.php last;
    }
    location /search-all-brands {
        rewrite ^/search-all-brands/?$ /search-all-brands.php last;
    }
    location /login {
        rewrite ^/login/?$ /login.php last;
    }
    location /settings {
        rewrite ^/settings/?$ /settings.php last;
    }
    location /two-factor {
        if ($arg_i) {
            rewrite ^/two-factor$ /two-factor.php last;
        }
    }
    location = /create {
        if ($arg_i) {
            rewrite ^/create$ /create.php last;
        }
    }
    location = /rules {
        if ($arg_i) {
            rewrite ^/rules$ /rules.php last;
        }
    }
    location = /edit {
       if ($arg_i) {
            rewrite ^/edit$ /edit.php last;
        }
    }
    location = /app {
         if ($arg_i) {
             rewrite ^/app$ /app.php last;
          }
    }
    location = /list {
         if ($arg_i) {
            rewrite ^/list$ /list.php last;
         }
    }
    location = /reports {
        if ($arg_i) {
             rewrite ^/reports$ /reports.php last;
        }
    }
    location = /edit-brand {
        if ($arg_i) {
            rewrite ^/edit-brand$ /edit-brand.php last;
         }
    }
    location = /templates {
        if ($arg_i) {
           rewrite ^/templates$ /templates.php last;
        }
    }
    location = /report {
        if ($arg_i) {
            rewrite ^/report$ /report.php last;
        }
    }
    location = /send-to {
        if ($arg_i) {
            rewrite ^/send-to$ /send-to.php last;
        }
    }
    location = /autoresponders-emails {
        if ($arg_i) {
            rewrite ^/autoresponders-emails$ /autoresponders-emails.php last;
        }
    }
    location = /autoresponders-list {
        if ($arg_i) {
            rewrite ^/autoresponders-list$ /autoresponders-list.php last;
        }
    }
    location = /autoresponders-edit {
        if ($arg_i) {
            rewrite ^/autoresponders-edit$ /autoresponders-edit.php last;
        }
    }
    location = /segments-list {
        if ($arg_i) {
           rewrite ^/segments-list$ /segments-list.php last;
        }
    }
    location = /segment {
        if ($arg_i) {
           rewrite ^/segment$ /segment.php last;
        }
    }
    location = /create-template {
        if ($arg_i) {
           rewrite ^/create-template$ /create-template.php last;
        }
    }
    location = /edit-template{
        if ($arg_i) {
           rewrite ^/edit-template$ /edit-template.php last;
        }
    }
    location = /template-preview {
        if ($arg_i) {
            rewrite ^/template-preview$ /template-preview.php last;
        }
    }
    location = /new-list {
        if ($arg_i) {
            rewrite ^/new-list$ /new-list.php last;
        }
    }
    location = /subscribers {
         if ($arg_i) {
            rewrite ^/subscribers$ /subscribers.php last;
         }
    }
    location = /custom-fields {
         if ($arg_i) {
            rewrite ^/custom-fields$ /custom-fields.php last;
         }
    }
    location = /remove-duplicates {
         if ($arg_i) {
            rewrite ^/remove-duplicates$ /remove-duplicates.php last;
         }
    }
    location = /blacklist-blocked-domains {
         if ($arg_i) {
            rewrite ^/blacklist-blocked-domains$ /blacklist-blocked-domains.php last;
         }
    }
    location = /delete-from-list {
         if ($arg_i) {
            rewrite ^/delete-from-list$ /delete-from-list.php last;
         }
    }
    location = /blacklist-suppression {
         if ($arg_i) {
            rewrite ^/blacklist-suppression$ /blacklist-suppression.php last;
         }
    }
    location = /unsubscribe-from-list {
         if ($arg_i) {
            rewrite ^/unsubscribe-from-list$ /unsubscribe-from-list.php last;
         }
    }
    location = /update-list {
         if ($arg_i) {
            rewrite ^/update-list$ /update-list.php last;
         }
    }
    location ~ ^/housekeeping-(\w+)$ {
         rewrite ^/housekeeping-(\w+)$ /housekeeping-$1.php last;
    }

    access_log /var/log/nginx/sendy_access.log;
    error_log /var/log/nginx/sendy_error.log;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For configure NGINX with SSL config&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```server {&lt;br&gt;
    server_name your_sendy_domain.com &lt;a href="http://www.your_sendy_domain.com"&gt;www.your_sendy_domain.com&lt;/a&gt;;&lt;br&gt;
    root /var/www/sendy; # Change this to your Sendy installation directory&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;index index.php index.html index.htm;
autoindex off;

add_header X-Robots-Tag "noindex, noarchive";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~ /\.  { deny all; log_not_found off; access_log off; return 404; }

location / {
    try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Adjust the PHP version if needed
    fastcgi_index index.php;
    fastcgi_param   SCRIPT_FILENAME $request_filename;
    include fastcgi_params;
}

location ~ /\.ht {
    deny all;
}

location ~* \.(css|js|gif|jpe?g|png)$ {
    expires max;
    log_not_found off;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;
}
location /l/ {
    rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
}
location /t/ {
    rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
}
location /w/ {
    rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
}
location /unsubscribe/ {
    rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
}
location /subscribe/ {
    rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
}
location /confirm/ {
    rewrite ^/confirm/(.*)$ /confirm.php?i=$1 last;
}
location /new-brand {
    rewrite ^/new-brand/?$ /new-brand.php last;
}
location /search-all-brands {
    rewrite ^/search-all-brands/?$ /search-all-brands.php last;
}
location /login {
    rewrite ^/login/?$ /login.php last;
}
location /settings {
    rewrite ^/settings/?$ /settings.php last;
}
location /two-factor {
    if ($arg_i) {
        rewrite ^/two-factor$ /two-factor.php last;
    }
}
location = /create {
    if ($arg_i) {
        rewrite ^/create$ /create.php last;
    }
}
location = /rules {
    if ($arg_i) {
        rewrite ^/rules$ /rules.php last;
    }
}
location = /edit {
   if ($arg_i) {
        rewrite ^/edit$ /edit.php last;
    }
}
location = /app {
     if ($arg_i) {
         rewrite ^/app$ /app.php last;
      }
}
location = /list {
     if ($arg_i) {
        rewrite ^/list$ /list.php last;
     }
}
location = /reports {
    if ($arg_i) {
         rewrite ^/reports$ /reports.php last;
    }
}
location = /edit-brand {
    if ($arg_i) {
        rewrite ^/edit-brand$ /edit-brand.php last;
     }
}
location = /templates {
    if ($arg_i) {
       rewrite ^/templates$ /templates.php last;
    }
}
location = /report {
    if ($arg_i) {
        rewrite ^/report$ /report.php last;
    }
}
location = /send-to {
    if ($arg_i) {
        rewrite ^/send-to$ /send-to.php last;
    }
}
location = /autoresponders-emails {
    if ($arg_i) {
        rewrite ^/autoresponders-emails$ /autoresponders-emails.php last;
    }
}
location = /autoresponders-list {
    if ($arg_i) {
        rewrite ^/autoresponders-list$ /autoresponders-list.php last;
    }
}
location = /autoresponders-edit {
    if ($arg_i) {
        rewrite ^/autoresponders-edit$ /autoresponders-edit.php last;
    }
}
location = /segments-list {
    if ($arg_i) {
       rewrite ^/segments-list$ /segments-list.php last;
    }
}
location = /segment {
    if ($arg_i) {
       rewrite ^/segment$ /segment.php last;
    }
}
location = /create-template {
    if ($arg_i) {
       rewrite ^/create-template$ /create-template.php last;
    }
}
location = /edit-template{
    if ($arg_i) {
       rewrite ^/edit-template$ /edit-template.php last;
    }
}
location = /template-preview {
    if ($arg_i) {
        rewrite ^/template-preview$ /template-preview.php last;
    }
}
location = /new-list {
    if ($arg_i) {
        rewrite ^/new-list$ /new-list.php last;
    }
}
location = /subscribers {
     if ($arg_i) {
        rewrite ^/subscribers$ /subscribers.php last;
     }
}
location = /custom-fields {
     if ($arg_i) {
        rewrite ^/custom-fields$ /custom-fields.php last;
     }
}
location = /remove-duplicates {
     if ($arg_i) {
        rewrite ^/remove-duplicates$ /remove-duplicates.php last;
     }
}
location = /blacklist-blocked-domains {
     if ($arg_i) {
        rewrite ^/blacklist-blocked-domains$ /blacklist-blocked-domains.php last;
     }
}
location = /delete-from-list {
     if ($arg_i) {
        rewrite ^/delete-from-list$ /delete-from-list.php last;
     }
}
location = /blacklist-suppression {
     if ($arg_i) {
        rewrite ^/blacklist-suppression$ /blacklist-suppression.php last;
     }
}
location = /unsubscribe-from-list {
     if ($arg_i) {
        rewrite ^/unsubscribe-from-list$ /unsubscribe-from-list.php last;
     }
}
location = /update-list {
     if ($arg_i) {
        rewrite ^/update-list$ /update-list.php last;
     }
}
location ~ ^/housekeeping-(\w+)$ {
     rewrite ^/housekeeping-(\w+)$ /housekeeping-$1.php last;
}

access_log /var/log/nginx/sendy_access.log;
error_log /var/log/nginx/sendy_error.log;

listen 443 ssl http2;
ssl_certificate /path/to/your/ssl_certificate.crt;
ssl_certificate_key /path/to/your/ssl_certificate_key.key;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;server {&lt;br&gt;
    if ($host = your_sendy_domain.com) {&lt;br&gt;
        return 301 https://$host$request_uri;&lt;br&gt;
    }&lt;br&gt;
    listen 80;&lt;br&gt;
    server_name your_sendy_domain.com;&lt;br&gt;
    return 404;&lt;br&gt;
}```&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Save the file and create a symbolic link to it in the sites-enabled directory:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/sendy.conf /etc/nginx/sites-enabled/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Test the NGINX configuration:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nginx -t&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If the test is successful, reload NGINX:&lt;/p&gt;

&lt;p&gt;sudo service nginx reload&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Update Sendy Configuration
&lt;/h2&gt;

&lt;p&gt;Edit the Sendy settings file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano /var/www/sendy/includes/config.php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Update the following lines with your server information:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```define('APP_PATH', '&lt;a href="https://your_sendy_installation_url'"&gt;https://your_sendy_installation_url'&lt;/a&gt;);&lt;/p&gt;

&lt;p&gt;/*  MySQL database connection credentials (place values between the apostrophes) */&lt;br&gt;
$dbHost = ''; //MySQL Hostname&lt;br&gt;
$dbUser = ''; //MySQL Username&lt;br&gt;
$dbPass = ''; //MySQL Password&lt;br&gt;
$dbName = ''; //MySQL Database Name&lt;/p&gt;

&lt;p&gt;/*  Set this if you use a non standard MySQL port.  */&lt;br&gt;
$dbPort = 3306; ```&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Save the changes and exit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Test the Configuration
&lt;/h2&gt;

&lt;p&gt;Open your web browser and navigate to your Sendy domain. If everything is configured correctly, you should see the Sendy login page.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>php</category>
    </item>
  </channel>
</rss>
