server {
listen 173.255.219.235:80;
server_name website.com.au;
rewrite / $scheme://www.$host$request_uri permanent;
}
server {
listen 173.255.219.235:443;
server_name website.com.au;
rewrite / $scheme://www.$host$request_uri permanent;
}
server {
listen 173.255.219.235:80;
server_name www.website.com.au;
root /data/www;
index index.html index.php;
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}
location /app/ { deny all; }
location /includes/ { deny all; }
location /lib/ { deny all; }
location /media/downloadable/ { deny all; }
location /pkginfo/ { deny all; }
location /report/config.xml { deny all; }
location /var/ { deny all; }
location /var/export/ {
auth_basic "Restricted";
auth_basic_user_file /rs/passwords/testfile;
autoindex on;
}
location /. {
return 404;
}
location @handler {
rewrite / /index.php;
}