Advertisement
mkoflerAT

nginx-letsencrypt-template-1st

Dec 10th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.58 KB | None | 0 0
  1. server {
  2.     listen 80 default_server;
  3.     listen [::]:80 default_server;
  4.  
  5.     ### ===== added for lets-encrypt-support =====
  6.         location ~ /.well-known {
  7.                 allow all;
  8.         }
  9.  
  10.     ### ===== adjusted servername / webroot =====
  11.         server_name xyz.com www.xyz.com;
  12.         root /var/www/xyz.com/html;
  13.  
  14.     # Add index.php to the list if you are using PHP
  15.     index index.html index.htm index.nginx-debian.html;
  16.  
  17.     location / {
  18.         # First attempt to serve request as file, then
  19.         # as directory, then fall back to displaying a 404.
  20.         try_files $uri $uri/ =404;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement