Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 25th January 2010, 09:23
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

PS. I think I might have discoverd a bug in how the SSL certs work. If I change the Certificate while the SSL tab is marked, Apache seems to die. So you would do wisely if you unmark SSL before you make any changes in SSL settings. Then after changes you can remark it.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Sponsored Links
  #12  
Old 25th January 2010, 13:43
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default

Nope, no SSL. I hunted through everything to make sure. No one tried to do SSL.

I put everything to *, so that I could see where client9 was redirecting. When it was *, everything except client9's main domain works. Their main domain then loads client7's index. I have no idea why. Here are the two vhost entries when everything on the server is *

Client 7
Code:
<Directory /var/www/andrewwegner.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
    DocumentRoot /var/www/clients/client7/web6/web

    ServerName andrewwegner.com
    ServerAlias www.andrewwegner.com
    ServerAlias test.andrewwegner.com
    ServerAdmin webmaster@andrewwegner.com

    ErrorLog /var/log/ispconfig/httpd/andrewwegner.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 503 /error/503.html

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

    # suphp enabled
    <Directory /var/www/clients/client7/web6/web>
        suPHP_Engine on
        # suPHP_UserGroup web6 client7
        AddHandler x-httpd-suphp .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-suphp
    </Directory>

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^test.andrewwegner.com [NC]
    RewriteRule   ^/(.*)$ /var/www/clients/client7/web6/web/test/$1  [L]


</VirtualHost>
Client 9
Code:
<Directory /var/www/team-vipers.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
    DocumentRoot /var/www/clients/client9/web8/web

    ServerName team-vipers.com
    ServerAlias bans.team-vipers.com
    ServerAlias stats.team-vipers.com
    ServerAlias fastdl.team-vipers.com
    ServerAdmin webmaster@team-vipers.com

    ErrorLog /var/log/ispconfig/httpd/team-vipers.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 503 /error/503.html

    <Directory /var/www/team-vipers.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client9/web8/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # suphp enabled
    <Directory /var/www/clients/client9/web8/web>
        suPHP_Engine on
        # suPHP_UserGroup web8 client9
        AddHandler x-httpd-suphp .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-suphp
    </Directory>

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^bans.team-vipers.com [NC]
    RewriteRule   ^/(.*)$ /var/www/clients/client9/web8/web/sourcebans/$1  [L]
    RewriteCond %{HTTP_HOST}   ^stats.team-vipers.com [NC]
    RewriteRule   ^/(.*)$ /var/www/clients/client9/web8/web/hlstatsce/$1  [L]
    RewriteCond %{HTTP_HOST}   ^fastdl.team-vipers.com [NC]
    RewriteRule   ^/(.*)$ /var/www/clients/client9/web8/web/fastdownload/$1  [L]


</VirtualHost>
Those subdomains that 9 has set up work in this configuration.
Reply With Quote
  #13  
Old 25th January 2010, 14:26
jon jon is offline
Member
 
Join Date: Jan 2007
Location: Canada
Posts: 87
Thanks: 12
Thanked 5 Times in 5 Posts
Send a message via Skype™ to jon
Default

I should just point out that making a backup of everything is a good idea. I'm still looking through the configs ...
Reply With Quote
  #14  
Old 25th January 2010, 17:21
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default

Thanks for the help so far. Let me know if you need any more information. I have been looking through more settings and can not see anything that would cause these problems. I don't think there is a smilie to show my level of confusion.
Reply With Quote
  #15  
Old 25th January 2010, 17:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,717
Thanks: 820
Thanked 5,322 Times in 4,175 Posts
Default

Make sure that you do not mix * and IP in the settings of the websites. Either use * for all of them or the IP address for all of them. Otherwise it can happen that all sites where you selected * will show up as the first site where you selected the IP address as the IP has priority in apache.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 25th January 2010, 17:51
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default

I made all of them * this morning. This fixed everything, except the currently functioning domain.

The domain that works now started pointing the an index file in another client's website. I tested this by modifying their default index.html and then refreshing the existing domain. It had the change. When it was a *, it seems to be pointing at a completely different DocRoot, even though the configuration I posted above shows it pointing to the correct location.

The existing domain would not find subdirectories either. In this case, it threw a 404 for the /forums/ subdirectory. When it was not a *, this functioned.

The SUBdomains for the domain did work.

Examples when everything was a *:
www.team-vipers.com/forums/ - 404
bans.team-vipers.com - 200
andrewwegner.com - 200
team-vipers.com - 200 (But, it pulled the index file from andrewwegner.com)
Reply With Quote
  #17  
Old 25th January 2010, 19:10
jon jon is offline
Member
 
Join Date: Jan 2007
Location: Canada
Posts: 87
Thanks: 12
Thanked 5 Times in 5 Posts
Send a message via Skype™ to jon
Default

Try this from a console ...


tail -F /var/log/apache2/*.log

Hit CTRL+R in your web browser and see what log pops up with a request. This should help narrow down where that page is ending up.

You will need to be root and typically sudo wont cut it.

Last edited by jon; 25th January 2010 at 19:16. Reason: Added root comment
Reply With Quote
  #18  
Old 26th January 2010, 14:59
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default

I set everything to * and ran the tail command.

client6 - Displays correctly, no entry in the log file
client7 - Attempts to redirect to a subdirectory in client9, No entry in the log
client8 - Displays correctly, entry in log file
Code:
[Tue Jan 26 07:50:19 2010] [info] Executing "/var/www/clients/client8/web7/web/index.php" as UID 5005, GID 5009
client9 - Displays an ISPConfig welcome page, that appears to be from client7, No entry in the log

I was curious why client7 would redirect to a subdirectory. Client9 has an .htaccess file that reads like this:

Code:
#ErrorDocument 403 /blocked_hosts/forbid.php
#ErrorDocument 404 /forums/missing.php
DirectoryIndex portal.php index.php index.html index.htm
Options +FollowSymLinks
RewriteEngine on
# If requesting bans, stop processing
RewriteCond %{HTTP_HOST} ^bans\.team-vipers.com
RewriteRule .* - [L]

# If requesting hlstatsce, stop processing
RewriteCond %{HTTP_HOST} ^stats\.team-vipers.com
RewriteRule .* - [L]

# If requesting fastdownloads, stop processing
RewriteCond %{HTTP_HOST} ^fastdl\.team-vipers.com
RewriteRule .* - [L]

# Didn't Request any subdomains - make it go to www
RewriteCond %{HTTP_HOST} ^team-vipers\.com
RewriteRule ^(.*)$ http://www.team-vipers.com/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/(blocked_hosts|gamingservers|forums|piwik_stats|sourcebans|stats)
RewriteRule ^(.*)$ http://www.team-vipers.com/forums/$1 [R=301,QSA,L]
Is this .htaccess file messing stuff up?

I'm curious why client6 displays correctly, but doesn't have an entry in the log.
Reply With Quote
  #19  
Old 26th January 2010, 15:05
jon jon is offline
Member
 
Join Date: Jan 2007
Location: Canada
Posts: 87
Thanks: 12
Thanked 5 Times in 5 Posts
Send a message via Skype™ to jon
Default

While you wait try this ...

Go in to /etc/apache2/sites-enabled

Move all sites out to a temporary directory and check what happens.

One at a time, move them back until you have a problem.

When the problem starts, move that site back to the temporary directory and move on to the next.

Perhaps one of the configurations is borked
Reply With Quote
The Following User Says Thank You to jon For This Useful Post:
Mosquito (26th January 2010)
  #20  
Old 26th January 2010, 19:02
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
 
Default

Ok. I have all the sites working, though not exactly how I had planned.

Problem 1: All redirecting to client9
Solved: Removed the multiple IPs. Everything now uses * and clients no longer have the ability to select a separate IP for their site.

Problem 2: When everything was *, client 9 was redirecting to some weird location.
Solved: Client9 had an entry in their .htaccess file to automatically add 'www' to the front of their domain. ISPConfig had been set to no leading 'www'. ISPConfig won. Since the client hadn't set up their site to respond to non-www URIs, it failed.

I'll figure out what went wrong with the multiple IPs on the system at a later point.

Thank you for your help.
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
Problems with client websites jeeva General 17 5th October 2009 11:33
SSL Issues on Client Websites deezone General 1 24th December 2008 17:06
add web site serr57 Installation/Configuration 18 13th April 2008 11:40
Apache2 server stopped working and fails restart without error chillifire Installation/Configuration 3 13th March 2008 16:26
vsftp - 550 Failed to change directory latcarf Server Operation 8 14th May 2006 02:05


All times are GMT +2. The time now is 15:44.


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