yogjun / myblog

0 stars 0 forks source link

nginx安装 #31

Closed yogjun closed 2 years ago

yogjun commented 4 years ago

yum install -y nginx 申请ssl证书,并存放在 /etc/nginx/cert 目录下 mkdir /etc/nginx/cert

vim /etc/nginx/nginx.conf

systemctl enable nginx.service

http://192.168.1.48/foo/api 案例 location proxy_pass 结果
1 /foo/ http://192.168.1.48/ /api
2 /foo http://192.168.1.48/ //api
3 /foo/ http://192.168.1.48 /foo/api
4 /foo http://192.168.1.48 /foo/api

https://www.jb51.net/article/146975.htm