nginx 配置为
server {
listen 443;
server_name zentao.xxxx.com;
index index.html index.htm index.php;
root /data/www/zentaopms/www;
ssl on;
ssl_certificate ssl/3007504_zentao.xxxx.com.pem;
ssl_certificate_key ssl/3007504_zentao.xxxx.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location ~ .*\.(php|php7)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 1d;
}
location ~ .*\.(js|css)?$
{
expires 1d;
}
access_log /alidata/log/nginx/access/default.log;
}
不知道是 nginx 配置出问题了还是怎样?
1
doveyoung 2019-10-31 17:09:02 +08:00
我替楼下老哥问一下,报什么错(狗头)
listen 443 ssl http2 这个不知道有没有用,我一般习惯这么写 |
3
frozenway OP 这里有禅道的人吗?
|
4
GuryYu 2019-10-31 17:17:03 +08:00
我用的 docker 加 ningx 反代,https 可以正常使用。
参考 nginx 配置如下: ``` server{ listen 443 http2 ssl; server_name zentao.xxx.com; ssl_certificate cert/xxx.com/fullchain1.pem; ssl_certificate_key cert/xxx.com/privkey1.pem; #省略部分 ssl 配置 location / { rewrite "^.*$" /www permanent; } location /www { proxy_pass http://1.1.1.1:80/www; proxy_redirect off; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } ``` |