2017-07-31 14 views
0

私はDebianにnginxでJekyllをインストールしました。通常、私はPHPを使用するときに私のWebサーバーを保護する方法を知っています。あなたはphp-fpmとプールを作成することでこれを行うことができます。debian nginx webserverを安全にする方法

私の現在のnginxの構成:

server { 
    listen 80 ; 
    listen [::]:80; 

    return 301 https://$server_name$request_uri; 

    access_log /var/log/nginx/www.example.com-access.log timed; 
    error_log /var/log/nginx/www.example.com-error.log; 
    root /var/www/examplecom/html/_site; 
    server_name example.com www.example.com; 

     location/{ 
     index index.html index.php; 
     try_files $uri $uri/; 
     } 

    location ~ /.well-known { 
       allow all; 
     } 

} 

server { 
    listen 443 ssl; 
    listen [::]:443 ssl; 

    access_log /var/log/nginx/www.example.com-access.log timed; 
    error_log /var/log/nginx/www.example.com-error.log; 
    root /var/www/examplecom/html/_site; 
    server_name example.com www.example.com; 

    include snippets/ssl-example.com.conf; 
    include snippets/ssl-params.conf; 

    location/{ 
     index index.html index.php; 
     try_files $uri $uri/; 
    } 

    location ~ /.well-known { 
       allow all; 
     } 

} 

誰もが私のジキルを確保する方法を知っています。私はこのためにRubyをインストールしなければならなかったので、私はphp-fpmプールのような私のWebサーバーを保護したいと思っています。

私の設定に関する追加情報が必要な場合は、お知らせください!

答えて

2

Jekyllは静的なWebサイトを生成するので、セキュリティ上の脆弱性は、PHPやPythonなどの動的Webサイトと比べて関連性が低くなります。 NGINXが実際に持っているのはa guide on their website about what the configuration should be when hosting a static website.

セキュリティの重要性は、クライアントにとってより重要なので、SSL/TLS設定が最適であることを確認する必要があります。 A decent guide for this can be found here.

実際のSSL Labsの設定の強みを確認してください。

+0

こんにちは@ samy-coenen、あなたの大きな助けをありがとう! sslのラボの私の強みは+私はこれが良いconfiguratedだと思う+です。 nginx側では、私の公開鍵を固定して、nginxの設定を強化する必要があります。 – Noob

関連する問題