0

I've been trawling through forums trying to figure out why nginx won't point to my wordpress repo and loads the page 'This site can't be reached'. I followed the steps in this guide https://medium.com/@mohinisandy143/how-to-install-wordpress-with-php-8-3-on-ec2-instance-running-nginx-32e58380f103 to get wordpress installed with nginx on an ec2 instance to the tee, so not sure what could be missing. I created this wordpress config file in sites-available:

    server {
    listen 80;
    server_name exampledomain.co.uk;
    root /var/www/html;
    index index.php index.html index.htm;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php$ {  
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    location ~ /\.ht {
        deny all;
    }
}

And then symlinked it using:

sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/

I than then tested nginx using:

sudo nginx -t

And restarted it with:

sudo systemctl reload nginx

The page would not load, so I've tried removing the default symlink which was mentioned in other articles as well as checking the firewall settings which are set to false, so should allow port 80 to work. Any ideas what could preventing this from working? Thanks

0

You must log in to answer this question.

Browse other questions tagged .