根据端口查找pid
netstat -nlp|grep :80
cd /proc/3697 数字为pid值
ll 然后ll后能看到对应的目录
路径:/usr/local/tengine/conf
nginx 配置文件引入配置文件,Nginx配置虚拟主机(外部文件引入方式)https://blog.csdn.net/csdn_heshangzhou/article/details/82765576
nginx指定配置文件启动:/usr/local/tengine/sbin/nginx -c /usr/local/tengine/conf/nginx.conf
nginx修改配置后重载
/usr/local/tengine/sbin/nginx -s reload
/usr/local/tengine/sbin/nginx -cs /usr/local/tengine/conf/nginx.conf reload
--后面一般跟长的完名名字 如 chkconfig --add
-后面一般跟简写大多数是一个字母,的如 ls -l
nginx
location ^~ /omsweixapptc 对应应用的url如:http://apiomstc.aux-home.com/omsweixapptc/
spring boot mvc+nginx需要额外配置:
location ^~ /omsweixapptc {
root html;
index index.html index.htm;
if ($request_uri ~* "org.apache") {
return 403;
}
proxy_pass http://omsweixapptc.eshop.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}