感觉总是犯一些 低级错误 ,在服务器nginx配置了1401端口,但是访问一直不成功,
最后才想起来,是没有打开 服务器防火墙的 1401 端口
!!!!!!!
server { listen 1401; # 端口号 server_name www.limengkai.work limengkai.work; # 配置域名信息 root /home/tomcat/apache-tomcat-9.0.21/webapps/web2_war/mk_learn/; # 静态页面根目录 index index.html; } #默认使用最高权限 user root; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; #服务1 舰艇 server { listen 80; server_name www.limengkai.work limengkai.work; rewrite ^(.*)$ https://${server_name}$1 permanent;
} server { listen 443 ssl http2; server_name www.limengkai.work limengkai.work; root /data/wwwroot/Logistics; #项目路径 charset utf-8; ssl_certificate /data/wwwroot/Logistics/1701030_www.limengkai.work.pem;#.pem证书路径 ssl_certificate_key /data/wwwroot/Logistics/1701030_www.limengkai.work.key;#.key证书路径 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; error_page 497 https://$host$request_uri; location / { include uwsgi_params; uwsgi_pass 127.0.0.1:8999; uwsgi_param UWSGI_SCRIPT Logistics.wsgi; uwsgi_param UWSGI_CHDIR /data/wwwroot/Logistics/;#项目路径 } location /static/ { alias /data/wwwroot/Logistics/static/; #静态资源路径 } access_log /data/wwwroot/Logistics/www.limengkai.work.log; error_log /data/wwwroot/Logistics/www.limengkai.work.error.log; } server { listen 1401; # 端口号 server_name www.limengkai.work limengkai.work; # 配置域名信息 root /home/tomcat/apache-tomcat-9.0.21/webapps/web2_war/mk_learn/; # 静态页面根目录 index index.html; }
}