#1  
Old 30th January 2012, 19:34
alicumircea alicumircea is offline
Junior Member
 
Join Date: Jan 2012
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default vhost issue ?!

Hi,
First I want to congratulate all your team for ISPconfig releases. I'm using it successfully for several years now.
However, I seem to encounter some issues with the latest version. I installed ver 3.0.4.1 on a new server and there seem to be a problem with it. My distro is latest OpenSuse and apache webserver. The server currently has one public IP.
I created a client and a website for it. Webiste worked fine until I created another 2 sites for the same client.
My current configuration is like this:
-client1 -site1
-site2
-site3
The problem is that when I activate site2 and site3 all http requests (no matter they come for site 1 or 3) go to site2. I really can't find what's causing this issue.
This is the content of my httpd.conf:
Code:
Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf
Include /etc/apache2/vhosts.d/*.conf

<Directory /srv/www>
    Options FollowSymlinks
</Directory>

Include /etc/apache2/sites-enabled/
My sites enabled contain the vhost files for all 3 sites. These are all of them:
Site1:
Code:
<Directory /srv/www/site1.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /srv/www/site1.com/web
..
    ServerName site1.com
    ServerAlias www.site1.com
    ServerAdmin webmaster@site1.com

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


    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 /srv/www/site1.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /srv/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # suexec enabled
    SuexecUserGroup web1 client1
    # 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@site1.com">
    php_admin_value upload_tmp_dir /srv/www/clients/client1/web1/tmp
    php_admin_value session.save_path /srv/www/clients/client1/web1/tmp
  # PHPIniDir /srv/www/conf/web1
    php_admin_value open_basedir /srv/www/clients/client1/web1/web:/srv/www/clients/client1/web1/tmp:/var/www/site1.com/web:/srv/www/site1.com/web:/usr


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web1 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
     # Do not execute PHP files in webdav directory
      <Directory /srv/www/clients/client1/web1/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>


</VirtualHost>
Site 2:
Code:
<Directory /srv/www/site2.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /srv/www/site2.com/web
..
    ServerName site2.com
    ServerAlias www.site2.com
    ServerAdmin webmaster@site2.com

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


    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 /srv/www/site2.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /srv/www/clients/client1/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # suexec enabled
    SuexecUserGroup web2 client1
    # 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@site2.com"<>
    php_admin_value upload_tmp_dir /srv/www/clients/client1/web2/tmp
    php_admin_value session.save_path /srv/www/clients/client1/web2/tmp
	# PHPIniDir /srv/www/conf/web2
    php_admin_value open_basedir /srv/www/clients/client1/web2/web:/srv/www/clients/client1/web2/tmp:/var/www/site2.com/web:/srv/www/site2.com/web:/usr/s


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web2 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	# Do not execute PHP files in webdav directory
      <Directory /srv/www/clients/client1/web2/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>


</VirtualHost>
Site 3:
Code:
<Directory /srv/www/site3.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /srv/www/site3.com/web
..
    ServerName site3.com
    ServerAlias www.site3.com
    ServerAdmin webmaster@site3.com

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


    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 /srv/www/site3.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /srv/www/clients/client1/web3/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    # suexec enabled
    SuexecUserGroup web3 client1
    # 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@site3.com"<->
    php_admin_value upload_tmp_dir /srv/www/clients/client1/web3/tmp
    php_admin_value session.save_path /srv/www/clients/client1/web3/tmp
	# PHPIniDir /srv/www/conf/web3
    php_admin_value open_basedir /srv/www/clients/client1/web3/web:/srv/www/clients/client1/web3/tmp:/var/www/site3.com/web:/srv/www/site3.com/web:/usr/sha


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web3 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	# Do not execute PHP files in webdav directory
      <Directory /srv/www/clients/client1/web3/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>


</VirtualHost>
Any ideas?
Reply With Quote
Sponsored Links
  #2  
Old 30th January 2012, 20:19
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,994
Thanks: 840
Thanked 5,647 Times in 4,457 Posts
Default

Maybe the namevirtualhost lines for * are missing in your apache configuration. Try to add:

NameVirtualhost *:80
NameVirtualhost *:443

before the line:

Include /etc/apache2/sites-enabled/

in httpd.conf and restart apache.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
alicumircea (31st January 2012)
  #3  
Old 31st January 2012, 12:58
alicumircea alicumircea is offline
Junior Member
 
Join Date: Jan 2012
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

That was it.
Thanks!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incoming Emails abintipl Installation/Configuration 3 11th May 2011 10:03
default vhost 8omas Installation/Configuration 3 24th March 2011 11:44
Apps Apache vhost Croydon Developers' Forum 6 4th July 2010 16:01
DNS MX Issue jmead Installation/Configuration 3 29th November 2007 11:06
iptables issue with xen perfect setup - debian alexnz HOWTO-Related Questions 3 25th November 2006 14:49


All times are GMT +2. The time now is 12:43.


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