在linux上部署前端页面和jar包后,页面显示不出来,看了下nginx进程后,不知道怎么多出来这么多进程,而且提示80端口被占用,求帮助
sudo lsof -i :80 看一下80端口被哪个进程占用,然后再排查,修改,有用请采纳,谢谢
https配置,也可以使用nginx配置。
/usr/local/soft/nginx/
目录下找到conf/nginx.conf
配置文件,加下如下内容(和apache配置的端口不可重复,需换个端口):server {
listen 6712;
server_name 0.0.0.0:6712;
ssl on;
ssl_certificate /usr/local/soft/nginx/ssl/server.crt;
ssl_certificate_key /usr/local/soft/nginx/ssl/server.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv2 SSLv3;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://xxx.xx.x.xxx:6789;
proxy_read_timeout 300s;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'Upgrade';
}
}
配置https://xxx.xx.x.xxx:6712 代理到 http://xxx.xx.x.xxx:6789 ,访问的用一网站文件。
2. 重启nginx
该服务器上nginx未配置成linux服务,所以到nginx目录下找到执行文件:
3. https://xxx.xx.x.xxx:6712 正常访问