Tomcat版块配置:
vim /tomcat9/to/path/conf/server.xml
<Server port="8006" shutdown="SHUTDOWN">
配完上面的并不算完,还有数据库、redis需要配置连接:
Tomcat版块配置完毕................
Nginx版块配置:
server {
listen 80;
server_name [ Domain Name ];
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8007;
}
}
server {
listen 443 ssl;
server_name [ Domain Name ];
ssl_certificate /usr/local/nginx/cert/applets.pem;
ssl_certificate_key /usr/local/nginx/cert/applets.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
client_max_body_size 16m;
client_body_buffer_size 128k;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_connect_timeout 240;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_pass http://127.0.0.1:8007;
}
}