View Full Version : New Site Shows Apache Default page not uploaded index.html
mojosound
23rd February 2006, 19:33
I am new to this and learning so please bear with me. I have mandriva 2006. I setup ispconfig. My router is assigned ip 216.144.242.27. The pc has a static ip of 192.168.4.2. I created a new site www.cjt-design.com. I set the ip address to 216.144.242.27. I did not set dns, because I have other dns already. This was an existing site, so I changed the zone file a record for www.cjt-design.com to 216.144.242.27. The propogation is still in progress, but I have been able to see that the page that comes up for www.cjt-design.com just shows "It Works" which is the default apache web page for the mandriva linux. I have uploaded an index page that is different through the web ftp. I have tried changing the ip address in the site settings to 192.168.4.2, but this made no difference. I tried to search, but perhaps don't know the right terms to search for. Any help is appreciated.
Plascual
23rd February 2006, 19:56
I got the same problem. It comes up with the apache2-default page instead of the "Welcome to ... !" page.
http://www.howtoforge.com/forums/showthread.php?t=2653
I searched anything related to "apache2-default", "vhost", etc... but didn't find a solution yet.
falko
23rd February 2006, 22:57
I am new to this and learning so please bear with me. I have mandriva 2006. I setup ispconfig. My router is assigned ip 216.144.242.27. The pc has a static ip of 192.168.4.2. I created a new site www.cjt-design.com. I set the ip address to 216.144.242.27. I did not set dns, because I have other dns already. This was an existing site, so I changed the zone file a record for www.cjt-design.com to 216.144.242.27. The propogation is still in progress, but I have been able to see that the page that comes up for www.cjt-design.com just shows "It Works" which is the default apache web page for the mandriva linux. I have uploaded an index page that is different through the web ftp. I have tried changing the ip address in the site settings to 192.168.4.2, but this made no difference. I tried to search, but perhaps don't know the right terms to search for. Any help is appreciated.
What's in your Vhosts_ispconfig.conf?
mojosound
24th February 2006, 01:48
The file Vhost_ispconfig.conf is empty.
mojosound
24th February 2006, 02:43
Upon further research I discovered that there were several files with date and time stamps in their names. I picked the newest one and put into the Vhost_ispconfig.conf file. I was then able to get the site. I tried adding another site but the conf file did not get updated. Again I copied from the file with the newest timestamp and both sites are up. What do I need to do to get this to update?
dfriis
24th February 2006, 10:51
I have the same problem too and since I've reinstalled this machine ten times now I'm starting to get a bit desperate.
When I comment out RedirectMatch ^/$ /apache2-default/ I only see a listing of apache2-default, sharedip and webalizer. You can see what it looks like at http://friisweb.se.
My Vhosts_ispconfig.conf is NOT blank and looks like it is in order. The file is also included in apache2.conf.
I've followed the guide for "The perfect setup - debian sarge", but I get this same problem over and over. All looks good, nothing works.
I will give you all the information you need if you feel like helping me with this.
Thanks
falko
24th February 2006, 12:04
Upon further research I discovered that there were several files with date and time stamps in their names. I picked the newest one and put into the Vhost_ispconfig.conf file. I was then able to get the site. I tried adding another site but the conf file did not get updated. Again I copied from the file with the newest timestamp and both sites are up. What do I need to do to get this to update?
If Vhosts_ispconfig.conf is empty it is likely that some module that is needed is not included in your Apache configuration.
After you've renamed one of these Vhosts_ispconfig.conf files with a date appended to Vhosts_ispconfig.conf, please run httpd -t What's the output?
falko
24th February 2006, 12:05
I have the same problem too and since I've reinstalled this machine ten times now I'm starting to get a bit desperate.
When I comment out RedirectMatch ^/$ /apache2-default/ I only see a listing of apache2-default, sharedip and webalizer. You can see what it looks like at http://friisweb.se.
My Vhosts_ispconfig.conf is NOT blank and looks like it is in order. The file is also included in apache2.conf.
I've followed the guide for "The perfect setup - debian sarge", but I get this same problem over and over. All looks good, nothing works.
I will give you all the information you need if you feel like helping me with this.
Thanks
Please post the output of httpd -V Anything in the Apache error log?
dfriis
24th February 2006, 12:16
httpd -V gives:
Server version: Apache/2.0.54
Server built: Sep 5 2005 11:15:09
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec2"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
I found one error in the logs. Seems apache is looking in /var/www/web1 for the added site, but standard is /home/www..., isn't it? Changing that in ispconfig makes changes to the added site but I still only see a file listing, and it seems I end up at the server root, not in web1. Should I change it in apache? There's too many things to configure and I'm confused here.
mojosound
24th February 2006, 13:20
[root@cjt-design-server chris]# httpd -V
Server version: Apache/2.0.54
Server built: Jan 5 2006 11:10:01
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@cjt-design-server chris]#
falko
24th February 2006, 14:59
[root@cjt-design-server chris]# httpd -V
Server version: Apache/2.0.54
Server built: Jan 5 2006 11:10:01
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@cjt-design-server chris]#
From you I wanted to see the output of httpd -t, not httpd -V
falko
24th February 2006, 15:01
I found one error in the logs. Seems apache is looking in /var/www/web1 for the added site, but standard is /home/www..., isn't it?
Please post the error message.
mojosound
24th February 2006, 15:14
Sorry about that:
[root@cjt-design-server chris]# httpd -t
Syntax error on line 48 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
[root@cjt-design-server chris]#
I am going to try and google for the module.
till
24th February 2006, 15:20
Sorry about that:
[root@cjt-design-server chris]# httpd -t
Syntax error on line 48 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
[root@cjt-design-server chris]#
I am going to try and google for the module.
The missing apache module is mod_php
dfriis
24th February 2006, 15:39
Sorry, as a test I changed the site settings for the server in ispconfig. I changed the dokument root from /home/www to /var/www and then back again, so the former error message I had is now gone and has been replaced with another one. You can see the result at http://friisweb.se and now the error messages in error.log looks like: [Fri Feb 24 14:48:45 2006] [error] [client 217.***.**.***] (13)Permission denied: access to /web1/Maildir/index.html
denied, referer: http://friisweb.se/
I guess that's because of the file structure that now shows when you browse the site so everytime you browse friisweb.se the browser tries to check the mail folder.
I noticed that both sites-available/default and sites-enabled/000-default has /var/www as document root, but Vhosts_ispconfig.conf has /home/www/web1/web as document root. Still, friisweb.se still points to the same root as friisonline.com, my server domain.
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 195.38.5.139:80
<VirtualHost 195.38.5.139:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.friisweb.se:80
######################################
#
#
<VirtualHost 195.38.5.139:80>
ServerName www.friisweb.se:80
ServerAdmin webmaster@friisweb.se
DocumentRoot /home/www/web1/web
ServerAlias friisweb.se
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.$
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 Off
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>
#
#
#
This config file seems to be alright, and so does all the others. What other files would you like me to post? I'll post them all if you want :rolleyes:
mojosound
24th February 2006, 15:43
I can run php scripts. http://www.cjt-design-server.com/php_info.php runs fine.
mojosound
24th February 2006, 15:57
Ok, I missed the LoadModule mod_php5 from the perfect setup. Now I get:
[root@cjt-design-server chris]# httpd -t
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
[Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
Syntax OK
[root@cjt-design-server chris]#
Everything should be ok now?
dfriis
24th February 2006, 16:01
Btw, the guy posting http://www.howtoforge.com/forums/showthread.php?t=1424&highlight=sites-enabled
has a similar problem as I have.
falko
24th February 2006, 16:24
Ok, I missed the LoadModule mod_php5 from the perfect setup. Now I get:
[root@cjt-design-server chris]# httpd -t
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Fri Feb 24 09:54:15 2006] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
[Fri Feb 24 09:54:15 2006] [warn] NameVirtualHost 192.168.4.2:80 has no VirtualHosts
Syntax OK
[root@cjt-design-server chris]#
Everything should be ok now?
That's not serious. Please check at the end of /etc/httpd/conf/httpd.conf if Vhosts_ispconfig.conf is included twice or more. You should have it only once there. If you have to change anything, restart Apache afterwards.
falko
24th February 2006, 16:31
http://friisweb.se and now the error messages in error.log looks like: [Fri Feb 24 14:48:45 2006] [error] [client 217.***.**.***] (13)Permission denied: access to /web1/Maildir/index.html
denied, referer: http://friisweb.se/
That's weird. There must be something really mixed up on your system. Please check the ISPConfig database if it uses /home/www everywhere.
What's at the end of your Apache configuration file? It should look like this:
###############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/apache/vhosts/Vhosts_ispconfig.conf
dfriis
24th February 2006, 16:40
My apache2.conf ends with exactly that lines.
And yeah, I guess my system is messed up but the only thing I did was to change my server document root from /home/www to /var/www and back again. I sure hope it's something that can be repaired, otherwise it's not that great to be able to change it at all :(
I can only see two instances of /home/www in the database and that is in "doctype" and "isp_server". No instances of /var/www.
The server is a fresh install so if you want you'll get the login information for it :)
till
24th February 2006, 17:21
The problem is that ISPConfig might have created some configuration files in the one docroot and some others in the other docroot.
Never cahnge anything in the database directly, use always the ISPConfig interface!
To get a clean version of the config tree again, you should delete all websites, wait about 1 - 2 minutes, then empty the recycle bin. Then make sure your docroot setting in ISPConfig under management > server > settings is correct and create the websites and email users again.
You dont have to delete the resellers and clients as thei do not have any configuration inside the document root tree.
dfriis
24th February 2006, 20:36
Thanks till, that actually worked! Sort of....
After I've deleted the site /home/www is empty and /var/www contains the catalogs apache2-default, sharedip, web1, webalizer and www.friisweb.se
After creating the new site, /home/www contains web3 and www.friisweb.se
But...friisweb.se still point to the same docroot as the server domain friisonline.com
till
24th February 2006, 21:01
Please post the content of your Vhost_ispconfig.conf file.
dfriis
24th February 2006, 21:08
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 195.38.5.139:80
<VirtualHost 195.38.5.139:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.friisweb.se:80
######################################
#
#
<VirtualHost 195.38.5.139:80>
ServerName www.friisweb.se:80
ServerAdmin webmaster@friisweb.se
DocumentRoot /home/www/web3/web
ServerAlias friisweb.se
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml ind$
ScriptAlias /cgi-bin/ /home/www/web3/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /home/www/web3/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 Off
Alias /error/ "/home/www/web3/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/web3/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
</VirtualHost>
#
#
#
...and I have to say, cudos to you guys for this amazing support!
nok
25th February 2006, 10:55
i need this kind of support :-( all my sites load the apache-default page (commented out RewriteMatch too)!!
________
MAINE DISPENSARY (http://maine.dispensaries.org/)
________
Marijuana clone stores in sunland (http://dispensaries.org)
dfriis
27th February 2006, 07:54
bump
Seems this really is an issue. All I know is that I've followed the guide as carefully as I've could. This is still not working.
falko
27th February 2006, 09:23
bump
Seems this really is an issue. All I know is that I've followed the guide as carefully as I've could. This is still not working.
Maybe you should consider a clean re-install, and then don't try to change ISPConfig's web root after ISPConfig has been installed.
It's hard to tell from here what's wrong on your system...
dfriis
27th February 2006, 09:38
I've done clean installs a lot of times now and the added domain and site has always pointed to the wrong docroot.
Could this be related to a dns problem or is it only due to the server being misconfigured?
It seems that the problem is that the server isn't loading the vhosts. When you visit the server by writing it's ip adress you should be directed to the sharedip folder, but I only see the main domain docroot anyway. Where ever I go I end up at what you see at http://friisonline.com.
And, btw, I am behind a router. Could it be related to that?
Is there some way to do a clean reinstall of just ispconfig so that I don't have to reinstall the system too?
dfriis
27th February 2006, 14:50
I've now done a clean reinstallation of the ispconfig system and I still have the same problem. I have no errors in /var/log/apache2/error.log, apache2.conf has the ispconfig addons and it includes the Vhosts_ispconfig.conf, and Vhosts_ispconfig.conf looks alright to me.
httpd -V gives the same as I reported earlier.
Seems that no redirection works at all. When I browse the ip-adress I get that same docroot, but I should get the sharedip page, right?
falko
27th February 2006, 23:03
Seems that no redirection works at all. When I browse the ip-adress I get that same docroot, but I should get the sharedip page, right?
Yes, right.
Did you follow this tutorial? http://www.howtoforge.com/perfect_setup_debian_sarge
Did you do things differently than described in the tutorial?
dfriis
28th February 2006, 07:40
Yes, I followed that tutorial but no, I did nothing differently what I can tell. Since I haven't gotten this to work a few times I was careful not to make any mistakes and copy-pasted most of it.
As I've mentioned before my server is behind a router and the only thing I'm not sure about is when I should use my public ip and when to use my internal ip when configuring the server and dns settings. Could an error in the ip settings create the problem I'm having?
till
28th February 2006, 09:22
Yes, I followed that tutorial but no, I did nothing differently what I can tell. Since I haven't gotten this to work a few times I was careful not to make any mistakes and copy-pasted most of it.
As I've mentioned before my server is behind a router and the only thing I'm not sure about is when I should use my public ip and when to use my internal ip when configuring the server and dns settings. Could an error in the ip settings create the problem I'm having?
Yes, if your IP settings are incorrect you might get this error.
If you are in a NAT eviroment, always use your internal IP address. Only in the ISPConfig DNS-Manager you will have to use your external IP.
dfriis
28th February 2006, 09:53
Oh my...
The problem was huge, but the solution was simple. I had my external ip put up instead of my internal. I'm sorry that I've caused you such troubles.
The only problem I have now is that the web-ftp doesn't let me in but I'll fix that I guess.
Thanks for all your help though, I'll go stand in the corner now.
mebusybody
18th April 2006, 05:30
That's weird. There must be something really mixed up on your system. Please check the ISPConfig database if it uses /home/www everywhere.
What's at the end of your Apache configuration file? It should look like this:
###############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/apache/vhosts/Vhosts_ispconfig.conf
Hi falko
I had the same error, the <Directory /home/www/*/web>... was NOT in my httpd.conf, I added in restart the server but still have the same error.
I started a new thread http://www.howtoforge.com/forums/showthread.php?t=3756 regarding this. Should we continue with this thread or the other.
Thanks
falko
18th April 2006, 10:59
I started a new thread http://www.howtoforge.com/forums/showthread.php?t=3756 regarding this. Should we continue with this thread or the other.
Thanks
Let's take this to the new thread.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.