Question

any help me - my sites 404 not found

  • Posted September 24, 2019
  • Nginx

Good night. I installed 4 wordpress sites with the script: sudo ee site create yoursitename.com --type = wp --ssl = le --cache --yes

my certificates (ssl) have expired. I was informed that the script created a cron for lets encrypt renewal. It seems that was not true.

I asked for help on lets encrypt forum. one person asked to put in my configuration port 80 vhost.

I don’t know how to configure blocks. I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-install-o-nginx-no-ubuntu-18-04-en

My sites now display this message: "404 Not Found nginx / 1.14.0 (Ubuntu) "

my sites are in the folder: / opt / easyengine / sites

i have installed nginx, easyengine, letsencrypt

my sites: dietasbaratas.com artesasosbrasil.com.br wallacealb.com pietramancini.com

Subscribe
Share

Submit an 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 @wallace11622,

Try commenting out the following bit

try_files $uri $uri/ =404;

and replace it with

location ~ /\.well-known/acme-challenge {
	root /path/to/web/root;
}

This should do the trick for you.

Kind regards, Kalin

hi, @KFerdinandov this file? /etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

 server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs

**for all sites I created like this**

**nano /etc/nginx/sites-available/artesaosbrasil.com.br**

server {
        listen 80;
        listen [::]:80;

        root /var/www/artesaosbrasil.com.br/html;
        index index.html index.htm index.nginx-debian.html;

        server_name artesaosbrasil.com.br www.artesaosbrasil.com.br;

        location / {
                try_files $uri $uri/ =404;
        }
}

**nano /etc/nginx/sites-enabled/artesaosbrasil.com.br**


server {
        listen 80;
        listen [::]:80;

        root /var/www/artesaosbrasil.com.br/html;;
        index index.html index.htm index.nginx-debian.html;

        server_name artesaosbrasil.com.br www.artesaosbrasil.com.br;

        location / {
                try_files $uri $uri/ =404;
        }
}

Hi @wallace11622,

It’s possible you haven’t configured properly your nginx configuration file. Can you please post back your conf and we’ll try to further provide you with info?

Kind regards, Kalin