Question
404 Not Found nginx/1.10.0 (Ubuntu)
Hi guys,
I install wordpress on Lemp on 16.04 ( this was installed using the via DO droplet) following this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04 everything went well, but when I changed the permalinks to post-name since then apart from the home page anything else returns with this error ( 404 Not Found nginx/1.10.0 (Ubuntu) ) now I did of course followed the instruction for making changes in the /etc/nginx/sites-available/default take a look at my file below
GNU nano 2.5.3 File: /etc/nginx/sites-available/default
Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
Default server configuration
server {
listen 80 defaultserver;
listen [::]:80 defaultserver;
# SSL configuration
#
# listen 443 ssl defaultserver;
# listen [::]:443 ssl defaultserver;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don’t use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
http {
index index.html index.htm index.php index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
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;
}
I didn’t follow the instructions for installing ssl because this is test and I m did made another user with sudo privileges but there was nothing in the tutorial about switching to non root user at any point, so I continued using the root user for all the process.
I m completely new to this so can someone please help me with this. Also I have a sub domain that has it’s own WordPress installation but would be placed in the same dictionary and I m also planing on installing Vanilla forum as a subdomain or example.com/forum. For now I m just doing this on test environment using DO droplet and the ip address as the domain.
Thanks in advance for any help.
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.
×