server{listen80default_server;listen[::]:80default_server;server_name_;root/usr/share/nginx/html;# Load configuration files for the default server block.
include/etc/nginx/default.d/*.conf;location/{}error_page404/404.html;location=/40x.html{}error_page500502503504/50x.html;location=/50x.html{}}#下面是自定义配置 端口转发
server{listen80;server_namewww.abc.com;# 这里配置我们的域名,确定域名已解析到本机
location/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_passhttp://127.0.0.1:9000;#转发到本机9000端口
}}