-
-
Save tsak/fb99c478ab3887768090c130cbcb5552 to your computer and use it in GitHub Desktop.
tsak.dev nginx.conf
This file contains 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
if ($http_user_agent ~ "^(curl|HTTPie)") { | |
return 200 "\n ▀█▀ █▀ ▄▀█ █▄▀ ░ █▀▄ █▀▀ █░█\n ░█░ ▄█ █▀█ █░█ ▄ █▄▀ ██▄ ▀▄▀\n\n satan's hackathon boilerplate\n shitpit co-lead developer\n\n Blog: https://tsak.dev\n Github: https://github.com/tsak\n\n"; | |
} |
This file contains 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
server { | |
server_name tsak.dev; | |
include includes/curl.conf; | |
root /home/htdocs/tsak.dev; | |
index index.html; | |
gzip_static on; | |
gzip_proxied expired no-cache no-store private auth; | |
access_log /var/log/nginx/tsak.dev.log; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/tsak.dev/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/tsak.dev/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 { | |
access_log /var/log/nginx/http.tsak.dev.log; | |
include includes/curl.conf; | |
if ($host = tsak.dev) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
server_name tsak.dev; | |
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