Linux部署web项目配置Nginx
1.先配置java环境 下载 jdk-7u80-linux-x64.rpm2.下载数据库 mysql yum 安装3.下载linux下的tomcat 解压4.检测tomcat是否安装成功5.安装nginx https://blog.csdn.net/grhlove123/article/details/47834673 server { list...
1.先配置java环境 下载 jdk-7u80-linux-x64.rpm
2.下载数据库 mysql yum 安装
3.下载linux下的tomcat 解压
4.检测tomcat是否安装成功
5.安装nginx
https://blog.csdn.net/grhlove123/article/details/47834673
server {
listen 80;
server_name business-sign;//项目名 一般监听80端口
#charset koi8-r;
location ^~ /api/ {
#access_log logs/host.access.log main;
proxy_pass http://180.76.246.253:8088/business-sign/;
#防止jesession重新生成
proxy_cookie_path /business-sign/ /;
proxy_set_header Host $host;
proxy_set_header Remote_Addr $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
//静态资源加载位置
location / {
root /usr/local/data/business-sign/;
index index.html;
try_files $uri $uri/ /index.html;
}
}
更多推荐
所有评论(0)