Skip to content

Instantly share code, notes, and snippets.

@256hax
Last active May 6, 2019 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 256hax/4d68f3fb172989e2492f35099cdc06f8 to your computer and use it in GitHub Desktop.
Save 256hax/4d68f3fb172989e2492f35099cdc06f8 to your computer and use it in GitHub Desktop.
Avoid any received URL requests for Nginx on Dokku
server {
listen 80 default_server;
server_name _;
access_log off;
return 410;
}
# To handle HTTPS requests, you can uncomment the following section.
#
# Please note that in order to let this work as expected, you need a valid
# SSL certificate for any domains being served. Browsers will show SSL
# errors in all other cases.
#
# Note that the key and certificate files in the below example need to
# be copied into /etc/nginx/ssl/ folder.
#
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/cert.crt;
ssl_certificate_key /etc/nginx/ssl/cert.key;
access_log off;
return 410;
}
# More details => http://dokku.viewdocs.io/dokku~v0.15.5/configuration/domains/#default-site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment