#wiki.521php.com
server
{
listen 80;
server_name wiki.521php.com;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl;
ssl_certificate /home/cert/wiki.521php.com.crt;
ssl_certificate_key /home/cert/wiki.521php.com.key;
server_name wiki.demo.com wiki.521php.com;
# location ~ .*\.(ttf|woff2|eot|otf|map|swf|svg|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ {
# #此处将路径执行 MinDoc 的跟目录
# root /usr/share/nginx/mindoc;
# expires 30m;
# }
access_log /var/log/nginx/wiki.521php.com.log access;
# 这里为具体的服务代理配置
location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
#此处配置 MinDoc 程序的地址和端口号
proxy_pass http://521php_centos7:8282;
}
location / {
try_files /_not_exists_ @backend;
}
}
本文档使用 521Wiki 发布