Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- # listen 80 default_server;
- # listen [::]:80 default_server;
- listen 80;
- server_name xyz.com;
- return 301 https://www.xyz.com$request_uri;
- }
- server {
- # listen 80 default_server;
- # listen [::]:80 default_server;
- ### ===== added for lets-encrypt-support =====
- location ~ /.well-known {
- allow all;
- }
- ### ===== adjusted servername / webroot =====
- server_name xyz.com www.xyz.com;
- root /var/www/xyz.com/html;
- ### ===== SSL configuration =====
- listen 443 ssl http2 default_server;
- listen [::]:443 ssl http2 default_server;
- include snippets/ssl-xyz.com.conf;
- include snippets/ssl-params.conf;
- # Add index.php to the list if you are using PHP
- index index.html index.htm index.nginx-debian.html;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- try_files $uri $uri/ =404;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement