Antwort #3 am: 10. Februar 2016, 16:19:55
Und bitte an die Sicherheit denken:
# deny access to includes and inc php files
location ^/(includes|inc).*\.php$ { deny all; }
# deny access to cache, backups, download and templates_c
location ~ ^/(cache|backups|download|templates_c) { deny all; }
# disallow direct access to templates .html and .php files
location ~ ^/templates.*\.(html|php) { deny all; }
# disallow direct access to lang .html and .conf files
location ~ ^/lang.*\.(html|conf) { deny all; }
if ($http_host ~ "^shopname.de$"){
rewrite ^/(.*)$ $scheme://www.$http_host/$1 redirect;
}
htpasswd f. Admin:
location /admin/ {
auth_basic "Login Adminbereich";
auth_basic_user_file htpasswd/shopname_admin;
}
Besten Gruß,
h-h-h