HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   All sites resolve to web root (/var/www) (http://www.howtoforge.com/forums/showthread.php?t=15764)

unsichtbare 25th September 2007 00:05

All sites resolve to web root (/var/www)
 
I have installed ISPconfig with, apparently, no problems but all sites resolve to the web root of my system: /var/www . See this at:

http://www.506birch.com
http://www.headgallery.com

Where have I gone wrong?

-J

P.S. I posted this earlier in the wrong forum by mistake but was unable to delete or move it. Please excuse the re-post

catdude 25th September 2007 00:55

Quote:

Originally Posted by unsichtbare
I have installed ISPconfig with, apparently, no problems but all sites resolve to the web root of my system: /var/www . See this at:

http://www.506birch.com
http://www.headgallery.com

Where have I gone wrong?

-J

P.S. I posted this earlier in the wrong forum by mistake but was unable to delete or move it. Please excuse the re-post

If you log in to the ISPConfig web interface and click on "Management" in the top menu, then click "Server/Settings" on the left menu, then click on the "Web" tab, what do you have in the "httpd.conf" and "Document Root" fields?

If you look at the file located at the path in the "httpd.conf" field (in my case, /etc/apache2/apache2.conf), do you have a line that looks like "Include /etc/apache2/vhosts/Vhosts_ispconfig.conf" at the bottom of the file?

Finally, if you do have that line at the bottom of apache2.conf, if you look in the included file (for example, /etc/apache2/vhosts/Vhosts_ispconfig.conf), what are the DocumentRoots specified for the two domains you mentioned?

unsichtbare 25th September 2007 01:35

Thanks for the prompt reply!

httpd.conf = /etc/apache2/apache2.conf
Document Root = /var/www

apache2.conf has the line:

Include /etc/apache2/vhosts/Vhosts_ispconfig.conf

and the file looks like this


Quote:

###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 24.121.8.205:80
<VirtualHost 24.121.8.205:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.headgallery.com:80
######################################
#
#
<VirtualHost 24.121.8.205:80>
ServerName www.headgallery.com:80
ServerAdmin webmaster@headgallery.com
DocumentRoot /var/www/web6/web
ServerAlias headgallery.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
ErrorLog /var/www/web6/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 /var/www/web6/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web6/phptmp/
php_admin_value session.save_path /var/www/web6/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web6/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 ^/~([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
</VirtualHost>

catdude 25th September 2007 02:30

Quote:

Originally Posted by unsichtbare
Thanks for the prompt reply!

httpd.conf = /etc/apache2/apache2.conf
Document Root = /var/www

apache2.conf has the line:

Include /etc/apache2/vhosts/Vhosts_ispconfig.conf

and the file looks like this

Ok, now I'm puzzled too. The two lines from the Management screen look fine. The Include line is present in the conf file. And the included file specifies distinct DocumentRoots.

I think we now need to wait for more insight from other users.

unsichtbare 25th September 2007 02:46

Could the problem be coming from this portion of my apache2.conf file?

Quote:

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

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

###############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 /var/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 /var/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>
-J

catdude 25th September 2007 03:48

Quote:

Originally Posted by unsichtbare
Could the problem be coming from this portion of my apache2.conf file?



-J

That looks similar to what I've got in mine, except the "sites-enabled" line looks like:
Include /etc/apache2/sites-enabled/[^.#]*

unsichtbare 25th September 2007 04:32

Well,
I tried adding the control characters at the end of the line and restarting apache, to no avail.
Then I commented out the entire line: #Include /etc/apache2/sites-enabled/
and got:

The requested URL / was not found on this server.

what's in your /etc/apache2/sites-available/default file?

-J

till 25th September 2007 09:59

Is your server in a NAT enviroment behind a router? In this case, you will have to use your private IP address and not your public IP for the websites.

unsichtbare 25th September 2007 16:39

Yes and no. Initially I configured server and ISPconfig for 192.168.55.1 behind the router while my public IP was 24.xxx.xxx.xxx. I enabled port forwarding for all of the needed portd 80,22,443,etc. but the sites were not able to resolve at all: no apache messages, no ping, nothing.
I then changed the server configuration of ISPconfig to reflect my outside IP, while my /etc/network/network configuration remained 192.168.55.1 and immediatly I was able to log-into ISPconfig from the outside world and sites all began to resolve to the /var/www wrb root, ping, etc.
Box is down right now, maybe I can bring it up after work tonight at around 6:00 P.D.T.

-J

Spoiler 27th September 2007 16:33

i have the same problem here ... all sites go to /var/www.

in my case i found the error very quickly ... /etc/apache2/vhosts/Vhost_ispconfig.conf was empty.

i dont know how this can be.

There are some other files starting with "Vhost_ispconfig".
for example: Vhost_ispconfig.c~27-09-07_15-10-29

I think this file is a backup?

finaly i copied the latest file to Vhost_ispconfig.conf ... restart of apache puted out an error "php_admin_flag is unknown".
I deleted this row from Vhost_ispconfig.conf and the restart of apache2 was successful.
From this moment i get the correct site.

But: how it can be that Vhost_ispconfig.conf is empty??


All times are GMT +2. The time now is 00:04.

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