配置反向代理
在/usr/local/nginx/conf/vhost/下新建mytest.com.conf配置文件,内容如下:
server
{
listen 80;
server_name mytest.com;
location / { proxy_pass http://192.168.11.34:8181/; } location /my { proxy_pass http://192.168.11.34:8282/; } error_page 404 /404.html; }
保存并重新加载Nginx配置:
/usr/local/nginx/sbin/nginx -s reload