Welcome! Log In Create A New Profile


Set error_page follow reverse proxy kind

July 19, 2012 02:18AM
Hi everyone,
My Nginx server is Reverse Proxy and other Apache is web server (nginx) ----> (apache)

How can I config error_page when nginx configurated like as Reverse Proxy? And below my config file:

user nginx nginx;

worker_processes 2;
worker_rlimit_nofile 8192;

pid /var/run/nginx.pid;

events {
worker_connections 1024;

http {
limit_req_zone $binary_remote_addr zone=antiddos:10m rate=10r/s;
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

server_tokens off;
access_log /var/log/nginx_access.log main;
error_log /var/log/nginx_error.log debug;
server_names_hash_bucket_size 64;
sendfile on;
tcp_nopush on;
tcp_nodelay off;
keepalive_timeout 30;

proxy_buffering on;
proxy_buffer_size 16k;
proxy_buffers 100 8k;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;

server {
listen default rcvbuf=8192 sndbuf=16384 backlog=32000;
server_name _ ;
charset off;
access_log /var/log/nginx_host_general.access.log main;
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 2m;
client_body_buffer_size 8k;
proxy_buffering on;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 120;
proxy_buffer_size 16k;
proxy_buffers 32 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
include /usr/local/nginx/vhosts/*.conf;

Thank you very much
Subject Author Posted

Set error_page follow reverse proxy kind

killed July 19, 2012 02:18AM

Re: Set error_page follow reverse proxy kind

killed July 21, 2012 05:13AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready