编译环境
yum -y install gcc gcc-c++ autoconf automake
yum -y install zlib zlib-devel openssl openssl-devel pcre-devel安装ngnix
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar -zxvf nginx-1.12.2.tar.gz
cd nginx-1.12.2/
./configure
make
make install
cd /usr/local/nginx/sbin
./nginx
netstat -ntlp配置
cd /usr/local/nginx/conf
vi nginx.conf
location / {
root html;
index index.html index.htm;
}
location /tomcat/ {
root html;
index index.html index.htm;
proxy_pass http://localhost:8080/;
}重启
cd /usr/local/nginx/sbin
./nginx -s reload
-参考
http://blog.csdn.net/duguxingfeng/article/details/78929472
ngnix 端口映射
最新推荐文章于 2023-06-16 15:52:55 发布