Nginx 1.4.6 throwing errors 404 errors

December 11, 2015 441 views

My website ( is configured on nginx/1.4.6 (Ubuntu).

It's all pages are throwing 404 error, except home page and wordpress admin area.

Here is my virtual host config file

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /var/www/;
        index index.php index.html index.htm;


        #GZIP Configuration
        gzip on;
        gzip_min_length 100;
        gzip_comp_level 3;

        gzip_types text/plain;
        gzip_types text/css;
        gzip_types text/javascript;

        gzip_disable "msie6";

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules

        location ~* \.(css|js|jpg|png|gif)$ {
                access_log off;
                expires 1M;
                add_header Pragma public;
                add_header Cache-Control public;
                add_header Vary Accept-Encoding;

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;


1 Answer

Resolved this issue, I think this was from domain provider, when I moved it got fixed.

Have another answer? Share your knowledge.