config setup for the wordpress file in sites-available

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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:

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