Created
August 22, 2014 03:59
-
-
Save adriancbo/d6b58f70d463e294fd46 to your computer and use it in GitHub Desktop.
In your sites-available -> sites-enabled folder respective website config file
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 { | |
listen portnumber; | |
server_name ip_address; | |
location / { | |
root /var/www/mywebsite.com; | |
index index.html index.htm; | |
auth_basic "Restricted"; #For Basic Auth | |
auth_basic_user_file /etc/nginx/.htpasswd; #For Basic Auth | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment