Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2012, 17:37
buhlerax buhlerax is offline
Junior Member
 
Join Date: Aug 2010
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect using aliasdomains and flag "L" goes into loop

I have a client with the domain xxxxxxxxx.com.br, by default ispconfig creates the folder /var/www/clients/clientX/WEBX/web.

He created a subdirectory of /var/www/clients/clientX/WEBX/web/SiteY.

He then recorded another domain yyyyyyyy.com.br.

He wants the domain xxxxxxxxx.com.br open the folder /var/www/clients/clientX/WEBX/web and that the domain yyyyyyyy.com.br open the folder var/www/clients/clientX/WEBX/web/SiteY .

I tried this with aliasdomain, but it does not work the browser goes into loop.
How can I do this in ispconfig?
thank you

Alexandre Pereira Bühler
http://www.simaoebuhler.com.br
Reply With Quote
Sponsored Links
  #2  
Old 8th April 2012, 10:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What are the exact settings you use in ISPConfig? Can you post the vhost configuration file of the xxxxxxxxx.com.br website?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 9th April 2012, 19:07
buhlerax buhlerax is offline
Junior Member
 
Join Date: Aug 2010
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

enable: CGI, SSI, Ruby, Phyton, auto-subdomain (www.), mod-php

vhost not redirect:
<Directory /var/www/xxxxxxx.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost *:80>
DocumentRoot /var/www/xxxxxxx.com/web

ServerName xxxxxxx.com
ServerAlias www.xxxxxxx.com
ServerAdmin webmaster@xxxxxxx.com

ErrorLog /var/log/ispconfig/httpd/xxxxxxx.com/error.log

Alias /error/ "/var/www/xxxxxxx.com/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html

<IfModule mod_ssl.c>
</IfModule>

<Directory /var/www/xxxxxxx.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client6/web7/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

<IfModule mod_ruby.c>
<Directory /var/www/xxxxxxx.com/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

<IfModule mod_python.c>
<Directory /var/www/xxxxxxx.com/web>
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>

# cgi enabled
<Directory /var/www/clients/client6/web7/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client6/web7/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@softidei as.com"
php_admin_value upload_tmp_dir /var/www/clients/client6/web7/tmp
php_admin_value session.save_path /var/www/clients/client6/web7/tmp
# PHPIniDir /var/www/conf/web7

# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web7 client6
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client6/web7/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>

php_admin_value open_basedir "none"
<Directory /var/www/xxxxxxx.com/web/arquivos>
Options +Indexes
</Directory>

</VirtualHost>


vhost to aliasdomain:

<Directory /var/www/xxxxxxx.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost *:80>
DocumentRoot /var/www/xxxxxxx.com/web

ServerName xxxxxxx.com
ServerAlias www.xxxxxxx.com
ServerAlias www.yyyyyyy.com.br yyyyyyy.com.br
ServerAdmin webmaster@xxxxxxx.com

ErrorLog /var/log/ispconfig/httpd/xxxxxxx.com/error.log

Alias /error/ "/var/www/xxxxxxx.com/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html

<IfModule mod_ssl.c>
</IfModule>

<Directory /var/www/xxxxxxx.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client6/web7/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

<IfModule mod_ruby.c>
<Directory /var/www/xxxxxxx.com/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

<IfModule mod_python.c>
<Directory /var/www/xxxxxxx.com/web>
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>

# cgi enabled
<Directory /var/www/clients/client6/web7/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client6/web7/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@xxxxxxx.com"
php_admin_value upload_tmp_dir /var/www/clients/client6/web7/tmp
php_admin_value session.save_path /var/www/clients/client6/web7/tmp
# PHPIniDir /var/www/conf/web7

RewriteEngine on
RewriteCond %{HTTP_HOST} ^xxxxxxx.com$ [NC]
RewriteRule ^(.*)$ http://www.xxxxxxx.com$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^xxxxxxx.com$ [NC]
RewriteRule ^/(.*)$ /$1 [R]
RewriteCond %{HTTP_HOST} ^www.xxxxxxx.com$ [NC]
RewriteRule ^/(.*)$ /$1 [R]
RewriteCond %{HTTP_HOST} ^yyyyyyy.com.br$ [NC]
RewriteRule ^/(.*)$ /yyyyyyy/$1 [L]
RewriteCond %{HTTP_HOST} ^www.yyyyyyy.com.br$ [NC]
RewriteRule ^/(.*)$ /yyyyyyy/$1 [L]

# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web7 client6
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client6/web7/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>

php_admin_value open_basedir "none"
<Directory /var/www/xxxxxxx.com/web/arquivos>
Options +Indexes
</Directory>

</VirtualHost>
Reply With Quote
  #4  
Old 10th April 2012, 20:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

You have two vhosts for xxxxxxx.com???

Is it possible that you enabled the SEO redirect for xxxxxxx.com? If so, make sure the first drop-down says "No redirect" and that the second field is empty.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.