EnderWinner

NGinx with SSL for A+

Jan 28th, 2020
697
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen [::]:443 443 ssl http2;
  3.     server_name домен;
  4.     resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4;
  5.       root  /usr/share/nginx/html;
  6.       include /etc/nginx/default.d/*.conf;
  7.       location / {
  8.         root /usr/share/nginx/html;
  9.         index index.php index.html index.htm;
  10.       }
  11. error_page 404 /404.html;
  12. location = /404.html {
  13. root /usr/share/nginx/html;
  14. }
  15. error_page 500 502 503 504 /50x.html;
  16. location = /50x.html {
  17. root /usr/share/nginx/html;
  18. }
  19.     ssl_stapling on;
  20.     ssl on;
  21.     ssl_certificate /etc/letsencrypt/live/домен/fullchain.pem;
  22.     ssl_certificate_key /etc/letsencrypt/live/домен/privkey.pem;
  23.     ssl_trusted_certificate /etc/letsencrypt/live/домен/chain.pem;
  24.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
  25.     ssl_session_timeout 24h;
  26.     ssl_session_cache shared:SSL:2m;
  27.     ssl_protocols TLSv1.3 TLSv1.2;
  28.     ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  29.     ssl_prefer_server_ciphers on;
  30.     add_header Strict-Transport-Security "max-age=31536000;";
  31.     add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report";
  32.     location ~ \.php$ {
  33.         root /usr/share/nginx/html;
  34.         fastcgi_pass 127.0.0.1:9000;
  35.         fastcgi_index index.php;
  36.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  37.         include fastcgi_params;
  38.     }
  39. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×