添加 ssl 后,网站显示
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
想在 production.log 中查找是什么问题,可是立面什么都没有,一下子没有头绪,所以贴出我的 nginx 配置如下,麻烦大家帮我看看是什么问题呢:
user myusername;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80 default_server;
listen 443 ssl;
server_name snugnest.com;
root /mnt/www/snugnest.com/current/public;
ssl_certificate /etc/nginx/sites-enabled/ssl/214551715610547.pem;
ssl_certificate_key /etc/nginx/sites-enabled/ssl/214551715610547.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 ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @user1;
location @user2 {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass https://snugnest;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 1G;
keepalive_timeout 10;
}
}