location /i/ {
alias /data/w3/images/;
}
на запрос “/i/top.gif” будет отдан файл /data/w3/images/top.gif.
server {
server_name www.lorena-salon.ru;
access_log /var/log/ispconfig/httpd/$host/access.log;
location / {
index index.php index.html index.htm;
root /var/www/lorena-salon.ru/web/;
proxy_pass http://www.lorena-salon.ru:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
server {
server_name www.kredo-m.ru;
access_log /var/log/ispconfig/httpd/$host/access.log;
location / {
index index.php index.html index.htm;
root /var/www/kredo-m.ru/web/;
proxy_pass http://www.kredo-m.ru:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
uploads
/files/uploads
/files/uploads/files/uploads
/files/uploads/files/uploads/files/uploads
/files/uploads/files/uploads/files/uploads/files/uploads
/
RewriteCond %{HTTP_HOST} ^example.ru
RewriteRule (.*) http://www.example.ru/$1 [R=301,L]
RewriteCond %{SERVER_PORT} ^80$ [OR]
RewriteCond %{HTTP} =on
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^scaped_fragment_=.*$
RewriteRule ^_escaped_fragment_=\*$ /crawler/$1? [R=301]
RewriteRule ^http://test.ru/crawler$ http://127.0.0.1/$1? [L,R=301]
error_page 555 = @pass;
location @pass {
auth_basic "Unauthorized";
auth_basic_user_file /var/www/dev_htpasswd;
proxy_pass http://127.0.0.1:82;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
if ($http_host ~* "^(dev|old|www.old|www.dev)\..*\..{2,8}$"){
return 555;
}
if ($http_host ~* "^.*\.ks03\.ru$"){
return 555;
}
}
if ($host ~* ^(www\.)(.+)) {
set $HBW $2;
root /var/www/$HBW/web;
find . -name 'php.ini' -exec sed -i 's/log_errors = Off/log_errors = On/g' "{}" \;