PhD Social Science SETUP DRUPAL WITH NGINX WITH PHP AND SSL … . CODE BY SKRAITO ( GOD CLONE ) AND LORD JESUS CHRIST … .

DOWNLOAD LATEST DRUPAL FROM HERE :

https://drive.google.com/drive/folders/1V9r0a0zavd73CPoYTCM5h69-KGIcnF7Q?usp=sharing

# dnf install php-{bcmath,common,cli,curl,fpm,gd,json,intl,mbstring,mysqlnd,pear,simplexml,soap,xml,zip,zlib}
# systemctl enable php-fpm
# systemctl restart php-fpm 

First, we need to turn off the PHP output_buffering.

# nano /etc/php.ini

Copy to Clipboard

In this file, locate output_buffering = 4096 then replace it with output_buffering = off

Save the file, then exit from the editor.

Now, we will create a PHP-FPM pool for our drupal website.

# nano /etc/php-fpm.d/drupal.conf 

Paste the following into the file.

[drupal]

user = nginx
group = nginx

listen = /run/php-fpm/drupal.sock

listen.acl_users = apache,nginx
listen.owner = nginx
listen.group = nginx

pm = ondemand
pm.max_children = 50
pm.process_idle_timeout = 5s

Save the file, then exit. We need to restart PHP-FPM to apply the changes.

# systemctl restart php-fpm

Step 2. Install and Configure Nginx

Nginx is a fast and secure, one of the most popular and widely used web servers in the world. In this step, we are going to install Nginx as the web server essential for drupal.

# dnf install nginx -y

Nginx is not running automatically upon installation. Let’s start it now and make sure it starts upon server reboot.

# systemctl enable nginx
# systemctl restart nginx

Then, let’s create an nginx server block or virtual host.

# nano /etc/nginx/conf.d/drupal.yourdomain.com.conf
server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/html/drupal; # Note the /web subdirectory
    index index.php;

    # Logging
    access_log /var/log/nginx/drupal11_access.log;
    error_log /var/log/nginx/drupal11_error.log;

    # Handle clean URLs
    location / {
        try_files $uri /index.php?$query_string;
    }

    # Protect private files and configuration
    location ~* /sites/.*/files/private/ {
        internal;
    }

    # Handle image styles and assets
    location ~* /sites/.*/files/styles/ {
        try_files $uri @rewrite;
    }

    location @rewrite {
        rewrite ^/(.*)$ /index.php?q=$1;
    }

    # Process PHP scripts via FastCGI
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    # Static asset caching
    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
        expires max;
        log_not_found off;
    }

    # Block access to hidden files and vendor folders
    location ~ /\. {
        deny all;
    }
}

Save the file, then exit from the editor. We can now restart the nginx service to apply the changes.

# systemctl restart nginx

INSTALL ZEROSSL FROM THIS TUTORIAL … .

https://www.machophd.org/2026/06/26/phd-social-science-setup-nginx-for-ssl-from-zerossl-com-code-by-skraito-god-clone-and-lord-jesus-christ-with-added-if-you-need-php-at-nginx-which-is-wordpress/

Step 4. Install MariaDB Server

# dnf install mariadb-server

Copy to Clipboard

Upon installation, MariaDB will not start automatically. We need to execute the command below to start it now and enable it to start every time the server reboots.

# systemctl enable mariadb
# systemctl restart mariadb
# sudo mysql_secure_installation
# mysql -u root -p
CREATE DATABASE drupal11_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON drupal11_db.* TO 'drupal_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

DOWNLOAD DRUPAL 11 FROM :

# cd /root

DOWNLOAD FROM https://drive.google.com/drive/folders/1V9r0a0zavd73CPoYTCM5h69-KGIcnF7Q?usp=sharing

# unzip /root/filename.zip -d /var/www/html/drupal
# chown -R nginx: /var/www/html/drupal

or # cd /root
   # tar -zxvf filename.tar.gz
   # mv ./drupal_directory_after_unzip /var/www/html/drupal
   # chown -R nginx: /var/www/html/drupal

Run the Web Installer

  • Open your web browser and navigate to https://example.com
  • Select your preferred language and choose the Standard installation profile.
  • Under Database configuration, enter the values configured in Step 2:
    • Database name: drupal11_db
    • Database username: drupal_user
    • Database password: your_strong_password
  • Complete the wizard by defining your administrative site settings and account details.

FOLLOW IT AND THAT’S ALL … .

IF IT IS NOT WORKING CONTACT US AT COMMENT OR LIVE CHAT …

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *