problem with virtualhost (i searched first)

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

problem with virtualhost (i searched first)

Postby mnem0 » 29. July 2009 06:00

Hi,

i've installed xampp and tried to set a virtualhost in httdpd.conf like that
Code: Select all
<VirtualHost *:80>
   ServerAdmin webmaster@lausanne-massage.ch
    DocumentRoot c:\xampp\htdocs\lausanne-massage\
    ServerName www.lausanne-massage.ch
    ServerAlias www.lausanne-massage.ch
    ErrorLog @rel_logfiledir@/www.lausanne-massage.ch-error_log
    CustomLog @rel_logfiledir@/www.lausanne-massage.chaccess_log common
</VirtualHost>


the problem is apache won't start, telling me "DocumentRoot takes one argument, Root directory of the document tree"

could someone help me please ?
thank you :(
mnem0
 
Posts: 12
Joined: 16. May 2008 19:32

Re: problem with virtualhost (i searched first)

Postby Izzy » 29. July 2009 06:47

Remove your entry from the httpd.conf file then save the file and try and start Apache again and the error should go away and Apache should now start.


Now use the file specific for this job C:\xampp\apache\conf\extra\httpd-vhosts.conf file.

Try adding this (copy and paste perhaps):
Code: Select all
NameVirtualHost *:80

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

<VirtualHost *:80>
ServerName lausanne-massage.ch
ServerAlias www.lausanne-massage.ch
DocumentRoot "C:/xampp/htdocs/lausanne-massage"
ServerAdmin webmaster@lausanne-massage.ch
ErrorLog logs/lausanne-massage_error.log
CustomLog logs/lausanne-massage_access.log common
LogLevel error
</VirtualHost>
Save the file and try and start Apache again.

Go here
http://hexillion.com/co/DomainDossier.aspx
to test your site from the Internet (no need to ask a friend to test it) by adding lausanne-massage.ch in the text box and then ticking all the boxes - the 'Service Scan' will tell you if your site is accessible from the Internet and when the server is working it will give the server's details.

At the time of this reply a Service Scan gives 'connection refused' so check your firewall/router is configured correctly and that your ISP allows a web server on port 80.
Last edited by Izzy on 29. July 2009 07:38, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: problem with virtualhost (i searched first)

Postby Wiedmann » 29. July 2009 07:33

Code: Select all
    ErrorLog @rel_logfiledir@/www.lausanne-massage.ch-error_log
    CustomLog @rel_logfiledir@/www.lausanne-massage.chaccess_log common

"@rel_logfiledir@": The paths to the logfiles must be exists and can't be placeholders.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

[ALMOST SOLVED] Re: problem with virtualhost (i searched fir

Postby mnem0 » 29. July 2009 09:30

thank you izzy,
you're very kind : now lausanne-massage.ch works but www.lausanne-massage.ch doesn't :/
did i do something wrong ?

have a nice day, thank you again :D
mnem0
 
Posts: 12
Joined: 16. May 2008 19:32

Re: problem with virtualhost (i searched first)

Postby Izzy » 29. July 2009 10:00

http://www.lausanne-massage.ch works for me in fact it loads in this file:
http://www.lausanne-massage.ch/lausanne-massage.swf

So how have you tested it?

If you check the link I gave you and type www.lausanne-massage.ch in the text box of Domain Dossier it returns this:
Domain Dossier wrote:Address lookup
canonical name lausanne-massage.ch.
aliases www.lausanne-massage.ch
addresses 91.121.83.191
As well as this:
Domain Dossier wrote:Service scan
FTP - 21 Error: ConnectionRefused
SMTP - 25 Error: ConnectionRefused
HTTP - 80 HTTP/1.1 302 Found
Date: Wed, 29 Jul 2009 08:55:52 GMT
Server: Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9
X-Powered-By: PHP/5.2.9
Location: http://www.lausanne-massage.ch/lausanne-massage.swf
Connection: close
Content-Type: text/html
POP3 - 110 Error: ConnectionRefused
IMAP - 143 Error: ConnectionRefused
So as far as I can tell your virtualhost configuration is working just fine.

Good luck.
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 62 guests