Hi all,
I’m having issues with reverse proxy on Nginx
I was setting up a reverse proxy listening [::0]:80 acts as 6 to 4
server on
Nginx, so I’ve tried $host, $server_name, $http_host in proxy_pass
field,
but they all failed, and server threw same error:
[emerg]: invalid number of arguments in “proxy_pass” directive in
/etc/nginx/sites-enabled/reverse.proxy:16
Here’s my configuration file:
server {
listen [::0]:80;
server_name .;
access_log off;
error_log off;
location /{
proxy_pass $server_name
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_seze 64k;
}
}
I want to know is that possible to get every site to be reverse proxied
on
Nginx?
Thanks:)
Quan Zhou