0

I have uploaded Wordpress files to /var/www/html/mysite.com, given recursive permissions 755 and recursively owned by www-data:www:data

I use the PHP-FPM service running with NGINX as web server on ubuntu 20.04.

This is my domain configuration inside of /etc/nginx/conf.d/mysite.com

server {
        listen 80;
        server_name mysite.com www.mysite.com;

        root /var/www/html/mysite.com;

        index index.php;
        client_max_body_size 100M;


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

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.1-fpm.sock;
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
        ssl_certificate /home/ubuntu/cloudflare/mysite.com/cert.pub;
        ssl_certificate_key /home/ubuntu/cloudflare/mysite.com/cert.key;
}

I have a couple other sites with the same configuration and they work, but only this site gives me the This page isn't working - HTTP Error 500. So I want to know what the configuration problems are.

1

2 Answers 2

0

you should not use this kind of permissions... please verify the needed permissions for your wordpress instance.

Please check if php-fpm deamon is running...

systemctl status php8.1-fpmd or so... could differ depending on your os.

Please verify the socket file for php-fpm as well. The path to the file location is needed for nginx.

You should also check the error.log of your nginx instance.

0

I have figured it out from looking at the NGINX error logs in the "warn" scope, one configuration file for wordfence security plugin was using a hardcoded path to my website, and since I moved the files, it was looking for the old path, I updated the configuration to the new path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .