Wordpress admin on Nginx / Apache (reverse proxy) results sometimes in 500, sometimes

user12345678

New Member
I have a really curious situation with Nginx and Apache + PHP
Sometimes requests are resulted with a 500 Error, somtimes with a 200 but white page, sometimes it's working.
And nowhere in any logs I can find an error (the requests are visible in access log).

This is really curious - someone an idea where to search for the error?

Yesterday I've setup NGINX with that setup:
NGINX accepts every requests (on port 80) and is routing via reverse proxy depending in the request to the specific server via reverse proxy.
In this case it's an apache server (same server, Port 8080).
Nginx is used as load balancer; but for that request its the same server and it's not load balanced in this same - that means always the same server (I've double checked that yet).

Nginx redirects in case of wordpress admin to the page with port 8080:

NGINX Config:

server {
add_header X-Server-Info master-www;

listen 80;
server_name www.mydomain.com;
index index.html index.htm index.php;
root /var/www/mypathtowordpress;

location /wp-admin/ {
rewrite ^/(.*)$ http://www.mydomain.com:8080/$1 permanent;
}

error_log /var/log/nginx/wwwmaster.error.log;
log_format main '$status:$request_time:$upstream_response_time:$pipe:$body_bytes_sent $connection $remote_addr $host $remote_user [$time_local] "$request" "$http_referer" "$http_user_agent" "$http_x_forwarded_for" $upstream_addr $upstream_cache_status "in: $http_cookie"';

location / {
proxy_pass http://111.111.111.111:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
}

}

Apache has a normal virtual host config with no special configs. (openbasedir is set & safemode is off)

The request header also says, that only the apache delivered that request.
But before the nginx installation everything worked really fine with wordpress.

I checked these logs:
-) Sitespecific nginx error log
-) global nginx error log
-) Sitespecific apache error log
-) Global apache error log

Someone any idea where to search for the error?
 
Top