Skip to content

Instantly share code, notes, and snippets.

@xgenvn
Last active March 25, 2020 08:45
Show Gist options
  • Select an option

  • Save xgenvn/67b283792ec7ec2219ac3c3d8a08f186 to your computer and use it in GitHub Desktop.

Select an option

Save xgenvn/67b283792ec7ec2219ac3c3d8a08f186 to your computer and use it in GitHub Desktop.
Auto subdomain deployment with NGINX and SSLIP.IO (can change with NIP.IO, XIP.IO)
server {
listen 80;
listen [::]:80;
server_name ~^(.*)\.11-111-222-223\.sslip\.io;
auth_basic "Web - Auth";
auth_basic_user_file /etc/pwd/.htpasswd;
root /var/www/$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment