hello,<br><br>im trying to deny access to everything that it's a dir/vhost using the following config<br><br> server {<br> listen <a href="http://192.168.2.1">192.168.2.1</a>;<br> server_name
mysub.domain.tld;<br><br> access_log /var/log/nginx/localhost.access_log main;<br> error_log /var/log/nginx/localhost.error_log;<br><br> root /var/www/localhost/htdocs/mysub.domain.tld;
<br> location / {<br> allow <a href="http://192.168.2.2">192.168.2.2</a>;<br> deny all;<br> }<br> location /nginx_status {<br> stub_status on;<br> access_log off;
<br> allow <a href="http://127.0.0.1">127.0.0.1</a>;<br> deny all;<br> }<br> location ~ .php$ {<br> include /etc/nginx/fastcgi_params;<br> fastcgi_pass
<a href="http://127.0.0.1:1105">127.0.0.1:1105</a>;<br> fastcgi_index index.php;<br><br> # where the php files to pass to the listener.<br> fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs/mysub.domain.tld$fastcgi_script_name;
<br> }<br> }<br><br><br>Now there are 2 problems<br>- it only denies access to <a href="http://mysub.domain.tld/">http://mysub.domain.tld/</a> if i connect from another host<br>- if i connect from the right host when i try to access
<a href="http://mysub.domain.tld/">http://mysub.domain.tld/</a> it wants me to download or open a file... if i try <a href="http://mysub.domain.tld/index.php">http://mysub.domain.tld/index.php</a> it works ok... same with
<a href="http://mysub.domain.tld/myadmin">http://mysub.domain.tld/myadmin</a> for example still wants me to download/open file but works with <a href="http://mysub.domain.tld/myadmin/index.php">http://mysub.domain.tld/myadmin/index.php
</a><br><br>i tried with location ~ .* also but i get the same result except that it correctly denies access to everything apparently... but i still can't see the site from an allowed ip<br><br>What im doing wrong?<br>
<br>location ~ .*<br>