Report this

What is the reason for this report?

config setup for the wordpress file in sites-available

Posted on July 10, 2020

Sorry but I am having a little issue after following this guide. It seems to be coming from the config file that Nginx uses to locate WordPress

My current syntax is:

server {

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { log_not_found off; access_log off; allow all; }
    location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
        expires max;
        log_not_found off;
    }
    


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

I am using a Linux mint 19 system (runs Ubuntu 18.04), and all things related to the LEMP stack are well set, and I am hosting on my laptop’s localhost but when I enter ‘localhost’ in browser I get a 403 error.

Seems there is no file for Nginx to process, please help me get through this issue.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @stealthman,

I believe that you need to follow the prerequisites as well, for example, if you go through this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04

You will notice that there are two additiaonal settings that you have to add:

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

        location ~ /\.ht {
                deny all;
        }

And that you also need to have PHP FPM installed.

Let me know how it goes! Regards, Bobby

waoo this is a great resource I would study it deeply

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.