Last active
July 19, 2020 07:53
-
-
Save geekykant/2ade393db9ca6bb93c2fac3e09d8aca5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //prevents listening from other domains pointed to our IP | |
| server { | |
| listen 80 default_server; | |
| server_name _; | |
| return 404; | |
| } | |
| server { | |
| server_name paavam.com; | |
| access_log /var/log/nginx/paavam.access.log; | |
| error_log /var/log/nginx/paavam.error.log; | |
| root /var/www/paavam; | |
| index index.php; | |
| location / { | |
| try_files $uri $uri/ /index.php?$args; | |
| } | |
| location ~ \.php$ { | |
| include snippets/fastcgi-php.conf; | |
| fastcgi_pass unix:/run/php/php7.0-fpm.sock; | |
| } | |
| listen 443 ssl; # managed by Certbot | |
| ssl_certificate /etc/letsencrypt/live/ktustudy.in-0001/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/ktustudy.in-0001/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 = paavam.in) { | |
| return 301 https://$host$request_uri; | |
| } # managed by Certbot | |
| server_name paavam.com; | |
| listen 80; | |
| return 404; # managed by Certbot | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment