Welcome! Log In Create A New Profile

Advanced

Nginx and ~ symbol

Posted by gencer 
Nginx and ~ symbol
February 25, 2012 10:05AM
Hi everyone!

Could someone tell me whatt is the differences between this:

location ~ /(archives|fallen) {
autoindex on;
auth_basic "Restricted Area for Private Use Only";
auth_basic_user_file /usr/local/nginx/conf/passwords;
}


and this one:

location /(archives|fallen) {
autoindex on;
auth_basic "Restricted Area for Private Use Only";
auth_basic_user_file /usr/local/nginx/conf/passwords;
}

(There is no ~ symbol after the location)

I'm asking it brcause, if i use ~ symbol autoindex = on is not working but if i remove that symbol autoindex is working fine...

In the other hand, if i remove this symbol password protection just stop. If i add it, its protected.

Basically, i have to both password protection and indexing on these folders...

Any help will be appreciated.

Thanks,
Gencer.



Edited 3 time(s). Last edit at 02/25/2012 10:07AM by gencer.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready