diff --git a/get-started/install-docker.md b/get-started/install-docker.md index 3a4fc71b6bd1a345a2caf9af0910ee1a72c73a91..6b9672f306e423e7289f8d1b9cc9652888a65078 100644 --- a/get-started/install-docker.md +++ b/get-started/install-docker.md @@ -91,3 +91,49 @@ docker exec spug init_spug admin spug.dev ### 6. 版本升级 你可以在 `系统管理/系统设置/关于` 中查看当前运行的 `Spug` 版本,可以在 [更新日志](/docs/change-log) 查看当前最新版本,如果需要升级 `Spug` 请参考 [版本升级文档](/docs/update-version)。 + +### 7.nginx反向代理配置 +``` + server { + listen 80; + server_name 自己的域名; + return 301 https://$host$request_uri; #跳转443 + # Load configuration files for the default server block. + #include /etc/nginx/default.d/*.conf; + #location / { + # proxy_pass http://127.0.0.1:8080; + error_page 404 /404.html; + location = /404.html { + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + } + +# Settings for a TLS enabled server. + server { + listen 443 ssl http2; + server_name 自己的域名; + + ssl_certificate "/etc/nginx/ssl/xxxx.com_bundle.crt"; + ssl_certificate_key "/etc/nginx/ssl/xxxx.com.key"; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 10m; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + + # Load configuration files for the default server block. + # include /etc/nginx/default.d/*.conf; + location / { + proxy_pass http://0.0.0.0:8000; #监控docker的端口 + } + error_page 404 /404.html; + location = /40x.html { + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + } +``` \ No newline at end of file