【问题标题】:Laravel Forge SSLLaravel 锻造 SSL
【发布时间】:2017-03-30 19:19:21
【问题描述】:

我在 Forge 中安装了自定义 SSL 证书。现在我的网站宕机了-_-。

站点不可用,连接被拒绝

我已经重新启动了我的服务器,但没有任何效果。

这是我在etc/nginx/sites-available 中的domain.nl

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/domain.nl/before/*;

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name domain.nl;
    root /home/forge/domain.nl/public;

    # FORGE SSL (DO NOT REMOVE!)
    ssl_certificate /etc/nginx/ssl/domain.nl/1347/server.crt;
    ssl_certificate_key /etc/nginx/ssl/domain.nl/1347/server.key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES123428-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:-SHA256:DHE-RSA-AES256-SHA2578786:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB7-DES-CBC3-SHA';
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    index index.html index.htm index.php;

    charset utf-8;

    # FORGE CONFIG (DOT NOT REMOVE!)
    include forge-conf/domain.nl/server/*;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/domain.nl-error.log error;

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/domain.nl/after/*;

我更改了所有敏感信息。

【问题讨论】:

  • 服务是否在运行?尝试使用nginx -t 测试配置。
  • nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
  • 您的防火墙是否允许端口 443 上的传入流量?
  • 如何检查?
  • netstat -aln | grep 443 | grep -i listen 来自终端。如果没有输出,则说明该端口没有监听任何内容。

标签: php laravel ssl nginx laravel-forge


【解决方案1】:

尝试重启nginx

服务 nginx 重启

然后去 /var/mail 看看是否有 error.log 文件。然后写tail -100 error.log看看是什么问题

【讨论】:

    猜你喜欢
    • 2017-03-19
    • 2019-06-20
    • 1970-01-01
    • 2021-02-22
    • 2018-07-02
    • 1970-01-01
    • 2021-09-12
    • 2018-01-17
    • 2020-10-10
    相关资源
    最近更新 更多