2017-05-30 20 views
0

私のウェブサイト上で私のnginx設定に問題があります。ポート80で設定を実行しても問題はありませんが、ポート443にすべてを移動しても、サイトは応答しません。私はたくさん試して、私がここで間違っていることを見ていない。PHPのCMS用にnginxを使用したHTTPS設定Kirby

user www-data; 
worker_processes auto; 
pid /run/nginx.pid; 

events { 
     worker_connections 768; 
     # multi_accept on; 
} 

http { 
     include /etc/nginx/mime.types; 
     default_type application/octet-stream; 

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

     include /etc/nginx/conf.d/*.conf; 
     #include /etc/nginx/sites-enabled/*; 

     server { 
       listen 80; 

       server_name landing.kayzr.com; 
       return 301 https://landing.kayzr.com; 
     } 

     server { 
       listen 443; 
       server_name landing.kayzr.com; 

       ssl on; 
       ssl_certificate /etc/ssl/ssl-bundle.crt; 
       ssl_certificate_key /etc/ssl/server.key; 
       ssl_session_cache shared:SSL:10m; 
       ssl_session_timeout 10m; 
       ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DES-CBC3-SHA:!ADH:!AECDH:!MD5; 
       ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
       ssl_prefer_server_ciphers on; 
       ssl_session_cache shared:SSL:10m; 
       add_header Strict-Transport-Security "max-age=63072000"; 
       add_header X-Frame-Options DENY; 
       add_header X-Content-Type-Options nosniff; 
       ssl_stapling on; 
       ssl_stapling_verify on; 
       resolver 8.8.8.8 8.8.4.4; 

       root /var/www/html; 

       index index.php index.html index.htm; 

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

       rewrite ^/(content|site|kirby)$ /error last; 

       rewrite ^/content/(.*).(txt|md|mdown)$ /error last; 

       rewrite ^/(site|kirby)/(.*)$ /error last; 

       if (!-d $request_filename) { 
         rewrite ^/(.+)/$ /$1 permanent; 
       } 

       location ~ /panel { 
         try_files $uri $uri/ /panel/index.php?$uri&$args; 
       } 

       location ~/{ 
         try_files $uri $uri/ /index.php?$uri&$args; 
       } 

       location ~ (?:^|/)\. { 
         deny all; 
       } 

       location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ { 
         deny all; 
       } 
     } 
} 

これは私が 'root/var/www/html'から私のポート80サーバーにすべてのものをコピーしたもので、非httpsで動作します。

すべてのヘルプはOK

答えて

0

に感謝私は解決策が突然あり、私はそれを投稿(と私はほんの数時間後にこれを行う)のstackoverflow、毎回の詳細を投稿する必要があります。

ファイルが完全に正しいです。 Azureのセキュリティグループでは、ポート443だけが開かれませんでした。

関連する問題