Hi,
I'm really at my witts end with the nginx config files

I've got the main site going, but now I can't get the password protection going :/ Here is the main bit of my conf file:
Code:
server {
listen 443;
#server_name site.net www.site.net;
server_name site.net;
access_log /srv/www/site.net/logs/access.log;
error_log /srv/www/site.net/logs/error.log;
root /srv/www/site.net/www;
ssl on;
ssl_certificate /srv/www/site.net/wildcard.site.net.crt;
ssl_certificate_key /srv/www/site.net/wildcard.site.net.key;
if ($http_host ~ "www.site.net") {
rewrite /(.*)$ https://site.net/$1 permanent;
}
location /cgi-bin/admin {
#root /srv/www/site.net/www;
#satisfy any;
deny all;
allow 81.174.134.111;
auth_basic "Administrator Login";
auth_basic_user_file /var/www/site.net/htpasswd;
location ~ \.cgi$ {
try_files $uri =404;
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /srv/www/site.net/www/cgi-bin/$fastcgi_script_name;
}
}
location /admin {
#satisfy any;
allow 81.174.134.133;
deny all;
#auth_basic "Administrator Login";
#auth_basic_user_file /var/www/site.net/htpasswd;
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/site.net/www$fastcgi_script_name;
}
}
# other stuff here
}81.174.134.111 is *not* my IP (I've changed it, so I should be getting the password request prompt, but I don't).
Any ideas what is up? ATM my admin panel is wide open, and I can't figure out how to password protect it
EDIT: Today is getting better and better! Now the friggin thing won't even load the website! I now get:
Quote:
Secure Connection Failed
An error occurred during a connection to steampunkjunkies.net. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
...which is insane, as it was working just fine with that configuration! I've trimmed it down to only:
Code:
server {
listen 80;
server_name www.site.net site.net;
access_log /srv/www/site.net/logs/access.log;
error_log /srv/www/site.net/logs/error.log;
root /srv/www/site.net/www;
}
server {
listen 443;
server_name www.site.net site.net;
access_log /srv/www/site.net/logs/access.log;
error_log /srv/www/site.net/logs/error.log;
root /srv/www/site.net/www;
}
..rebooted nginx, and its still not loading anything :S
TIA
Andy