I am creating a website on an ubuntu server using nginx. I set it up so that when you go to it is ask for a user name and password. I used this command: sudo htpasswd -c /etc/nginx/.htpasswd username I then ran this command to make changes to this file: sudo gedit /etc/nginx/sites-enabled/default The files looks like this: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; server_name (put IP address here); # Change this to your FQDN. location /munki_repo/ { alias /usr/local/munki_repo/; autoindex off; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; } } So after doing that and and of course setting up the files/directories. When I go to ipaddress/munki_repo in the web browser and enter the correct username and password it gives me the following error: 403 Forbidden nginx/1.4.6 (Ubuntu) Any ideas as to what I am doing wrong? this is the first time I have used nginx? |
Ubuntu Web Server with Nginx
Collapse
X
-
Ubuntu Web Server with Nginx