webman-https-ssl-证书配置问题-Nginx配置
下面是我在用的webman配置https和开机自启动
↓↓↓没有设置反向代理↓↓↓
↓↓↓下面是配置文件↓↓↓
upstream webman {
server 127.0.0.1:8787;
keepalive 10240;
}
server {
server_name www.abcd.com;
listen 80;
listen 443 ssl http2;
access_log off;
error_log off;
proxy_buffering off;
root /www/wwwroot/www.abcd.com/public;
#强制重定向https
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
#ssl
ssl_certificate /www/server/panel/vhost/cert/www.abcd.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/www.abcd.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
#ssl_ciphers HIGH:!aNULL:!MD5;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1440m;
add_header Strict-Transport-Security "max-age=31536000";
error_page 497 https://$host$request_uri;
#一键申请SSL证书验证目录相关设置
location ~ \.well-known{
allow all;
}
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
#禁止在证书验证目录放入敏感文件
if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
return 403;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log /dev/null;
access_log /dev/null;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
}
location ^~ / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://webman;
}
}
}
另外我没有用守护进程,好像我这边系统的问题,我用的下面的方法也是可以开机自动启动的
个评论
这么配置貌似不好使啊