Created
April 21, 2018 23:23
-
-
Save dennisotugo/1dec7ac2266b77c68d48232b923fb185 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
| #vim /etc/nginx/sites-available/hng.fun | |
| server { | |
| root /var/www/HNGFun; | |
| index index.php index.html index.htm; | |
| server_name hng.fun www.hng.fun; | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } | |
| location ~ \.php$ { | |
| include snippets/fastcgi-php.conf; | |
| # Change php7.2 to the php version you have | |
| fastcgi_pass unix:/run/php/php7.1-fpm.sock; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| listen [::]:443 ssl ipv6only=on; # managed by Certbot | |
| listen 443 ssl; # managed by Certbot | |
| ssl_certificate /etc/letsencrypt/live/hng.fun/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/hng.fun/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 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment