Hi,
I have apache + nginx as proxy,in nginx.conf I have:
server {
listen 94.23.xx.xx:80 default;
server_name proxy ; # "_" is for handle all hosts that are not described by server_name
charset off;
access_log off;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#client_max_body_size 1024m; client_body_buffer_size 512k; client_body_timeout 10; client_header_buffer_size 4k; proxy_buffering off;
proxy_buffering on;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 128k;
proxy_buffers 50 32k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 1M;
proxy_pass http://94.23.xx.xx:8080; # apache here
}
error_page 500 502 503 504 404 /50x.html;
location = /50x.html {
root /usr/local/nginx/html;
}
}
When static file (jpg,swf,gif etc.) doesn't exists on server, apache returns 404 page but I want to handle the error with nginx without proxying to apache - how can I do this?