路径
root@ubuntu:/etc/nginx/conf.d文件夹目录下
ccc.conf文件
server {
listen 87;
server_name 192.168.1.55; #你的域名
charset utf-8;
#access_log /www_logs/nginx-access.log;
index index.html index.htm;
root /var/www/html/;
#设置go程序的代理转发
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:8090;
}
}
ddd.conf文件
server {
listen 86;
server_name 192.168.1.55; #你的域名
charset utf-8;
#access_log /www_logs/nginx-access.log;
index index.html index.htm;
root /var/www/html/;
#设置go程序的代理转发
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:8091;
}
}