Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name domainname;
- root /var/www/domainname;
- location / {
- try_files $uri $uri/ =404;
- }
- location /project1/ {
- root /var/www/domainname/project1/;
- try_files $uri /index.html;
- }
- location /project2/ {
- root /var/www/domainname/project2/;
- try_files $uri /index.html;
- }
- listen [::]:443 ssl; # managed by Certbot
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/domainname/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/domainname/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
- }
- server {
- if ($host = domainname) {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- listen 80;
- listen [::]:80;
- server_name domainname;
- return 404; # managed by Certbot
- } 1,1 Top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement