安装Namecheap的PositiveSSL后禁止使用403

时间:2019-06-14 18:09:59

标签: laravel nginx server

在我的服务器上安装具有Namecheap的PositiveSSL的SSL证书后,出现403禁止错误页面。在HTTP中,该页面确实有效。

我正在Nginx主机上开发Laravel应用

这是我的/etc/nginx/sites-enabled/ssl.conf

listen 443;
ssl on;
ssl_certificate /etc/nginx/sites-available/nginx_bundle_guida_deltipo.crt;
ssl_certificate_key /root/azas.social.key;


server_name  azas.social;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location / {

root /var/www/visibilio/visibilio/public;
index index.html;
}

} 

以下是nginx.conf文件:

        ##

        # SSL Settings

        ##

        client_max_body_size 1000m;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE

        ssl_prefer_server_ciphers on;



        ##

        # Logging Settings

        ##



        access_log /var/log/nginx/access.log;

        error_log /var/log/nginx/error.log;







        ##

        # Virtual Host Configs

        ##



        include /etc/nginx/conf.d/*.conf;

        include /etc/nginx/sites-enabled/*;

}

这是我的etc / nginx / sites-available /

server {
    listen 80;
    listen [::];

    root /var/www/visibilio/visibilio/public;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name in-visibili.org;
    return 301 https://azas.social$request_uri;
    location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri /index.php?$query_string;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules
        }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }

任何帮助将不胜感激

0 个答案:

没有答案
相关问题