ERROR 404 - Not Found! On SubDomain Wordpress Nginx

Discussion in 'General' started by freddie R, Jul 15, 2017.

  1. freddie R

    freddie R New Member

    Hello l am getting a ERROR 404 - Not Found! On a SubDomain using Wordpress and Nginx.
    the main site same issues before but it was fix by adding the code below. but how can l add it to the subdomain or how to fix the issue

    nginx Directives:
    if ($http_user_agent ~ WordPress) { return 444; }
    limit_req_zone $binary_remote_addr zone=default:10m rate=50r/m;
    location / {
    try_files $uri $uri/ /index.php?$args;
    fastcgi_read_timeout 600;
    proxy_read_timeout 300;
    limit_req zone=default burst=10 nodelay;
    }

    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;
    }

    client_max_body_size 100M;

    location /roundcube {
    root /var/lib/;
    index index.php index.html index.htm;
    location ~ (.+\.php)$ {
    try_files $uri =404;
    include /etc/nginx/fastcgi_params;
    # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
    #fastcgi_pass 127.0.0.1:9000;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 4k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    }
    location ~* /.svn/ {
    deny all;
    }
    location ~* /README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ {
    deny all;
    }
    }
    location /webmail {
    rewrite ^ /roundcube last;
    }
     

Share This Page