Getting a 404 when access the /wp-admin/ folder. Any idea why?
Here's the configuration file -
upstream domain_http {
server 192.168.1.2:80;
}
server {
listen 192.168.1.3:80;
server_name domain.com;
location ~* \.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|js|css|mp3|swf|ico|flv|woff)$
{
access_log /var/log/nginx/domain.com-static.log rt_cache;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
expires +7d;
gzip_vary on;
gzip on;
add_header Cache-control public;
proxy_pass http://domain_http;
proxy_cache STATIC;
proxy_cache_valid 200 3d;
proxy_cache_use_stale error timeout invalid_header updating
http_500 http_502 http_503 http_504;
proxy_cache_bypass $http_x_update; }
location / {
access_log /var/log/nginx/domain.com-pages.log rt_cache;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
expires 15m;
add_header Cache-control public;
proxy_pass http://domain_http;
#proxy_cache_bypass on;
proxy_cache STATIC;
proxy_cache_valid 200 15m;
proxy_cache_use_stale error timeout invalid_header updating
http_500 http_502 http_503 http_504;
proxy_cache_bypass $http_x_update; }
location /wp-admin/ {
access_log /var/log/nginx/domain.com-wp-admin.log rt_cache;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_cache_bypass on; }
}
Answer Found!
Adding proxy_pass http://domain_http;
to the /wp-admin/ section fixed the problem.