Nginx 二级代理配置 和 解决 Vue history 模式刷新地址栏 500
http {
....
server {
listen 80
server_name localhost
location /vue3demo {
alias C:\\myproject\\vue3-ts-cms
index index.html index.htm
try_files $uri $uri/ /vue3demo/index.html
}
location /blog/ {
proxy_pass http://localhost:8088/
proxy_pass_header Server
}
location / {
root html
index index.html index.htm
}
}
....
}
Https 证书配置
worker_processes 1;
....
events {
worker_connections 1024;
}
....
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
# 对外端口
listen 3000 ssl;
# 域名设置
server_name XX.XXX.com;
ssl_certificate ../cert/6523688.com.pem;
ssl_certificate_key ../cert/6523688.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
# 代理到本地服务
proxy_pass http:
}
}
}
....