#11  
Old 16th October 2005, 03:29
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Okay, I think I know how to fix this now.

One other thing...

I noticed in my main instance of Apache, not the ISPConfig, that the following line is present:
Code:
Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
I understand virtual hosts, but why does this line exist in my main Apache config file?

Thank you VERY much for answering my questions Falko, you have been very helpful!
Sponsored Links
  #12  
Old 16th October 2005, 10:54
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

Quote:
Originally Posted by ctroyp
Okay, I think I know how to fix this now.

One other thing...

I noticed in my main instance of Apache, not the ISPConfig, that the following line is present:
Code:
Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
I understand virtual hosts, but why does this line exist in my main Apache config file?
Because it's your main Apache that serves your virtual hosts. Don't let yourself irritate by the string ispconfig on the file name - that's just because it's the ISPConfig system which writes that file.
__________________
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:
  #13  
Old 16th October 2005, 17:23
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Now I have a problem with my sites linking to the wrong directory.

In my main Apache config file is the following:
Code:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
and:
Code:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
Is this correct? If not, what needs to be changed to direct my vhosts to the respective directories? /home/www/web1/web, etc...
  #14  
Old 16th October 2005, 17:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,476
Thanks: 813
Thanked 5,255 Times in 4,121 Posts
Default

That is correct, the document root settings are not relevant for ISPConfig. ISPConfig writes the vhost settings in the file /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf that is included at the end of the httpd.conf.
  #15  
Old 17th October 2005, 00:26
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Well, I thought I had it figured out but I still cannot get the ISPConfig sites to route to the proper directories. I keep getting the main Apache (default) page for my sites.

Everything looks correct in all of the config files. I don't know where to turn now.

This is what is in the main Apache httpd.conf file (/etc/httpd/conf) for ISPConfig:
Code:
###############ispconfig_log###############
LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig

<Directory /home/www/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>

<Directory /home/www/*/user/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>

<Directory /home/www/*/cgi-bin>
    Options ExecCGI -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
</Directory>

Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
and the ISPConfig Vhosts_ispconfig.conf file (/etc/httpd/conf/vhosts):
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 192.168.2.50:80
NameVirtualHost 192.168.2.50:80
#
#
######################################
# Vhost: www.mydomain1.com:80
######################################
#
#
<VirtualHost 192.168.2.50:80>
ServerName www.mydomain1.com:80
ServerAdmin webmaster@mydomain1.com
DocumentRoot /home/www/web1/web
ServerAlias mydomain1.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /home/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /home/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /home/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /home/www/web1/phptmp/
php_admin_value session.save_path /home/www/web1/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/home/www/web1/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.mydomain2.com:80
######################################
#
#
<VirtualHost 192.168.2.50:80>
ServerName www.mydomain2.com:80
ServerAdmin webmaster@mydomain2.com
DocumentRoot /home/www/web2/web
ServerAlias ftp.mydomain2.com mydomain2.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /home/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /home/www/web2/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /home/www/web2/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /home/www/web2/phptmp/
php_admin_value session.save_path /home/www/web2/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .ws .wmlscript
AddType image/vnd.wap.wbmp .wbmp
Alias /error/ "/home/www/web2/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /home/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web2/user/$1/web/$3
RewriteEngine on
RewriteCond %{HTTP_HOST}   ^ftp\.mydomain2\.com [NC]
RewriteRule   ^/(.*)$  http://www.mydomain2.com/ftp/$1  [R]
</VirtualHost>
#
#
#
Short of me having to reinstall everything, I thought I would post this info to see if you guys saw anything wrong. With this in mind, I can access my ISPConfig control panels, and FTP sites, etc.--just not the actual websites.

Is there anything you see that is incorrect? If not, what else do I need to check to see why the websites will not show?

THANKS!
  #16  
Old 17th October 2005, 09:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,476
Thanks: 813
Thanked 5,255 Times in 4,121 Posts
Default

Are you sure your domain mydomain2.com resolves to the correct IP: 192.168.2.50?

The vhosts are namebased, that means even if your domain resolves to an IP that is on the same server but it is not the IP in the vhost configuration you will see the apache main website!
  #17  
Old 17th October 2005, 09:10
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

Is it possible that you have Apache and Apache2 installed on your system, and Apache2 is the one that's running? Then maybe the ISPConfig configuration got written to Apache instead of Apache2 so that it has no effect...
__________________
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:
  #18  
Old 17th October 2005, 14:40
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by till
Are you sure your domain mydomain2.com resolves to the correct IP: 192.168.2.50?
To the best of my knowledge it is setup correctly. I have had these sites up and running correctly for a couple months now. It all changed when I installed Apache2 again with PHP4. I installed Apache2 and PHP4 in /usr/local/apache2 and PHP4 in /usr/local/apache2/lib/php-4.4.0. The problem is, when I installed this new instance of Apache, it wrote to my main (original) Apache config file somehow. It put in random start statements containing "apachectl start". I removed everything in my main config file to get it to match my original config, but it left me in the situation I am currently at. One other thing I did was I copied the PHP4 (libphp4.so) over to my modules directory of the main Apache and changed the main config file to "LoadModule php4_module modules/libphp4.so" instead of PHP5...

I did stop the newly installed Apache service and restarted the main.

To the best of my knowledge, this is all that I did.

How do I confirm that my domains are being resolved properly?
  #19  
Old 17th October 2005, 14:44
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by falko
Is it possible that you have Apache and Apache2 installed on your system, and Apache2 is the one that's running? Then maybe the ISPConfig configuration got written to Apache instead of Apache2 so that it has no effect...
In my last reply, I mentioned that I did install another instance of Apache2. This made it three instances of Apache2:
  • Main Apache2 in the /etc directory
  • ISPConfig Apache2, and
  • the new Apache2 that I installed with PHP4
  #20  
Old 17th October 2005, 14:50
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
 
Default

I juust realized that I cannot access either domain site (even though they both route to the main apache index.html) from outside my network--I get The page cannot be displayed". I can at least access the something from inside my network.
Closed Thread

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
[error] an unkown filter was not added: PHP Arien Installation/Configuration 12 7th October 2006 14:17
PHP not working jefash General 10 28th May 2006 08:48
Cannot compile new PHP with apxs olli Installation/Configuration 11 4th March 2006 15:32
Multiple domains jysse Installation/Configuration 2 10th August 2005 11:22
Apache + PHP lola Server Operation 1 25th April 2005 13:41


All times are GMT +2. The time now is 21:49.


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