Nginx-Server常规配置
1.cd /.../.../nginx/conf/(例如/usr/local/nginx/conf/)文件夹,新建*.conf(如net12.conf)
server { listen 888; server_name localhost; root /root/FirstApi/; index index.html index.htm; location / { proxy_pass http://localhost:5000; } }
2.编辑nginx.conf配置文件(vi nginx.conf)。
在http{}里最后一行加上刚才创建的目录地址。(注意是在http{}里)
include /usr/local/nginx/conf/vhost/*.conf;
本文来自博客园,作者:꧁执笔小白꧂,转载请注明原文链接:https://www.cnblogs.com/qq2806933146xiaobai/p/15424379.html