Redirect loop — как назнчаить alias?
Пытаюсь сделать передресацию — anydmoain.tld/webmail / anydmoain.tld/myadmin > specialdomain.tld/webmail / specialdomain.tld/myadmin
Уходит в лууп, что делать?
Конфиги:
/etc/httpd/conf/httpd.conf:
ServerName domain.tld CustomLog /var/www/httpd-logs/domain.tld.access.log combined DocumentRoot /var/www/domain/data/www/domain.tld ErrorLog /var/www/httpd-logs/domain.tld.error.log ServerAdmin info@domain.tld ServerAlias domain.info www.domain.tld www.domain.info SuexecUserGroup domain domain AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps php_admin_value open_basedir "/var/www/domain/data:." php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@domain.tld" php_admin_value upload_tmp_dir "/var/www/domain/data/mod-tmp" php_admin_value session.save_path "/var/www/domain/data/mod-tmp" ScriptAlias /cgi-bin/ /var/www/domain/data/www/domain.tld/cgi-bin/ Alias /manager /usr/local/ispmgr/bin/ Alias /manimg/ /usr/local/ispmgr/skins/ Alias /mancgi/ /usr/local/ispmgr/cgi/ Alias /myadmin /var/www/phpmyadmin/ Alias /webmail /var/www/roundcube/ Redirect permanent /manager/ispmgr/ /manager/ispmgr
/usr/local/ispmgr/etc/server.templ:
location / { if ($http_user_agent ~ (^$|-|ApacheBench/2.3)$) { return 444; } limit_req zone=req burst=3; } location ~ ^/webmail(.*)$ { rewrite ^ domain.tld/webmail/ permanent;} location ~ ^/myadmin(.*)$ { rewrite ^ domain.ltd/myadmin/ permanent;}
/etc/nginx/nginx.conf:
location ~ ^/webmail(.*)$ { rewrite ^ domain.tld/webmail/ permanent;} location ~ ^/myadmin(.*)$ { rewrite ^ domain.tld/myadmin/ permanent;} location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ { proxy_pass 1.1.1.1:81; proxy_redirect 1.1.1.1:81/ /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; }
Уходит в лууп, что делать?
Конфиги:
/etc/httpd/conf/httpd.conf:
ServerName domain.tld CustomLog /var/www/httpd-logs/domain.tld.access.log combined DocumentRoot /var/www/domain/data/www/domain.tld ErrorLog /var/www/httpd-logs/domain.tld.error.log ServerAdmin info@domain.tld ServerAlias domain.info www.domain.tld www.domain.info SuexecUserGroup domain domain AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps php_admin_value open_basedir "/var/www/domain/data:." php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@domain.tld" php_admin_value upload_tmp_dir "/var/www/domain/data/mod-tmp" php_admin_value session.save_path "/var/www/domain/data/mod-tmp" ScriptAlias /cgi-bin/ /var/www/domain/data/www/domain.tld/cgi-bin/ Alias /manager /usr/local/ispmgr/bin/ Alias /manimg/ /usr/local/ispmgr/skins/ Alias /mancgi/ /usr/local/ispmgr/cgi/ Alias /myadmin /var/www/phpmyadmin/ Alias /webmail /var/www/roundcube/ Redirect permanent /manager/ispmgr/ /manager/ispmgr
/usr/local/ispmgr/etc/server.templ:
location / { if ($http_user_agent ~ (^$|-|ApacheBench/2.3)$) { return 444; } limit_req zone=req burst=3; } location ~ ^/webmail(.*)$ { rewrite ^ domain.tld/webmail/ permanent;} location ~ ^/myadmin(.*)$ { rewrite ^ domain.ltd/myadmin/ permanent;}
/etc/nginx/nginx.conf:
location ~ ^/webmail(.*)$ { rewrite ^ domain.tld/webmail/ permanent;} location ~ ^/myadmin(.*)$ { rewrite ^ domain.tld/myadmin/ permanent;} location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ { proxy_pass 1.1.1.1:81; proxy_redirect 1.1.1.1:81/ /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; }