ERROR: any VirtualHost opens XAMPP Welcome page

Problems with the Windows version of XAMPP, questions, comments, and anything related.

ERROR: any VirtualHost opens XAMPP Welcome page

Postby raivis » 27. January 2009 19:16

I extract xampp-win32-1.7.0-pl1-beta3.7z on Flash HardDisk F:\xampp
and seted up VirtualHosts on F:\xampp\apache\conf\extra\httpd-vhosts.conf
Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot /Inetpub/backup
    ServerName backup
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /Inetpub/code
    ServerName code
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /xampp/htdocs
    ServerName localhost
</VirtualHost>

and local host names on C:\Windows\System32\drivers\etc\hosts
Code: Select all
127.0.0.1       localhost
127.0.0.1       backup
127.0.0.1       code

but I don't know why on starting Apache any of VirtualHosts opens XAMPP Welcome page!, like it is seted up in http://localhost/ in deafult xampp instalation.

Please help my to set up a VirtualHosts thet on host backup in will open /Inetpub/backup site and etc.
raivis
 
Posts: 6
Joined: 27. January 2009 18:45

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby glitzi85 » 27. January 2009 19:29

First you need to add this block also:

Code: Select all
<Directory /Inetpub>
  Order allow,deny
  allow from all
</Directory>

otherwise you will get an Access Denied Error.

To get rid of the XAMPP Welcome page please flush the Cache of your Browser.

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby raivis » 27. January 2009 21:29

glitzi85 wrote:First you need to add this block also:
Code: Select all
<Directory /Inetpub>
  Order allow,deny
  allow from all
</Directory>

otherwise you will get an Access Denied Error.

To get rid of the XAMPP Welcome page please flush the Cache of your Browser.


Anyway it still opens XAMPP Welcome page.
Please, did someone have some more suggestions?
raivis
 
Posts: 6
Joined: 27. January 2009 18:45

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby Wiedmann » 27. January 2009 21:34

Please, did someone have some more suggestions?

Maybe "something" --> your error.log
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby raivis » 27. January 2009 21:38

Wiedmann wrote:
Please, did someone have some more suggestions?

Maybe "something" --> your error.log

error.log
Code: Select all
[Tue Jan 27 22:37:06 2009] [warn] pid file F:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Jan 27 22:37:06 2009] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 27 22:37:06 2009] [notice] Digest: done
[Tue Jan 27 22:37:07 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.8 configured -- resuming normal operations
[Tue Jan 27 22:37:07 2009] [notice] Server built: Dec 10 2008 00:10:06
[Tue Jan 27 22:37:07 2009] [notice] Parent: Created child process 2256
[Tue Jan 27 22:37:09 2009] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 27 22:37:09 2009] [notice] Digest: done
[Tue Jan 27 22:37:11 2009] [notice] Child 2256: Child process is running
[Tue Jan 27 22:37:11 2009] [notice] Child 2256: Acquired the start mutex.
[Tue Jan 27 22:37:11 2009] [notice] Child 2256: Starting 250 worker threads.
[Tue Jan 27 22:37:11 2009] [notice] Child 2256: Starting thread to listen on port 80.
[Tue Jan 27 22:37:11 2009] [notice] Child 2256: Starting thread to listen on port 443.
raivis
 
Posts: 6
Joined: 27. January 2009 18:45

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby raivis » 27. January 2009 22:08

still the VirtualHost's not working!
some ideas how to fix it? maybe to do some changen in file httpd.conf ?
raivis
 
Posts: 6
Joined: 27. January 2009 18:45

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby dmphotography » 28. January 2009 00:13

Try this:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName backup
DocumentRoot F:/Inetpub/backup
</VirtualHost>

<VirtualHost *:80>
ServerName code
DocumentRoot F:/Inetpub/code
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot F:/xampp/htdocs
</VirtualHost>

If you get a 403 error, add the following:

<VirtualHost *:80>
ServerName code
DocumentRoot F:/Inetpub/code
<Directory "F:/Inetpub/code">
Options +Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

When trying to access these domains, make sure you enter them like this:

http://code/
http://backup/

This should work. Verify the directory path is correct and don't just copy the examples I used.
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby Izzy » 28. January 2009 01:56

When using a VirtualHost there should be no need to change anything in the httpd.conf file which is best left as the installation default.

If you have changed anything then revert to the default whilst testing your vhost conf file or again you may experience unusual errors.


Drive letters should not be used in a USB portable drive if indeed you wish your USB to be portable to other PCs or the alternate PC may not give the USB drive letter F if that drive is already in use, it will simply give it the next available drive letter and then your USB and VirtualHosts, in this case, will be broken.


The localhost should be first in the list so if there are any problems Apache will use the default localhost which is also an indication that the vhost conf is not quite right, which is why you were always being sent to the XAMPP Welcome page at localhost.


Any vhost's DocumentRoot not in the Apache server's DocumentRoot must have directory access permissions defined or an access denied error may ensue - the defaults in the httpd.conf file are restrictive for obvious security reasons, you don't want any Tom, Dick or Script Kiddie poking around inside your PC via your web server when connected to the Internet.



Try this and then add more vhosts if this works.
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot /xampp/htdocs
</VirtualHost>

<VirtualHost *:80>
ServerName backup
DocumentRoot /Inetpub/backup
<Directory /Inetpub/backup >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>



Adding the next vhost should then be configured based on the working 'backup' vhost.

Better to test with only one vhost then add more when that works as intended or there will be confusion otherwise which one is giving issues.

Check your paths and folder/file case as mentioned above and always save the file and restart Apache after editing any conf or ini file.

Make sure you only use a text editor like notepad not a RTF or word processor for editing files in XAMPP.


To check your vhosts conf file open a command prompt in the /xampp/apache/bin folder and type the command apache S to see if there are any errors - apache p will test the httpd.conf file.

Make sure that no part of your USB installation carries a drive letter or you will have errors and no portability - the readme_en.txt file is quite clear on that score by advising not to run the setup_xampp.bat file which will place a drive letter in all the paths.


Your next vhosts should look like this when you have the first 2 up and working as intended.
Code: Select all
<VirtualHost *:80>
ServerName code
DocumentRoot /Inetpub/code
<Directory /Inetpub/code>
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Good luck and please let us know how it went this time.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby raivis » 28. January 2009 09:54

Thanks, it work fine!
raivis
 
Posts: 6
Joined: 27. January 2009 18:45

Re: ERROR: any VirtualHost opens XAMPP Welcome page

Postby Izzy » 29. January 2009 01:26

Your welcome and it's good to hear it is now working and thanks for posting back as it may help others searching the forums with similar issues.

Good luck and enjoy your XAMPP experience. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 122 guests