localhost and virtualhost configuration

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

localhost and virtualhost configuration

Postby pavonic » 15. February 2006 14:21

Hi,

with XAMPP1.5 I was able to configure a virtualhost with document root in my home directory while keeping the localhost with the default XAMPP documentroot dir.

That is, when I request the URL "http://localhost" with Firefox the browser load the default XAMPP home page while when I request the URL "local.sentina.it" I got the home page of my local web site located in my home subdir (/home/pavonic/local.sentina.it).

To make this I added only the virtualhost section in httpd.conf:

Code: Select all
NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
    DocumentRoot /opt/lampp/htdocs
    ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
    DocumentRoot /home/pavonic/local.sentina.it
    ServerName local.sentina.it
</VirtualHost>




With XAMPP1.5.1 the configuration above doesn't work any more (I've moved lines above in the extra/httpd-vhosts.conf). When I try to load the URL http://local.sentina.it the browser add always the string '/xampp' to the url and the XAMPP home page is loaded. When istead I loadthe URL http://local.sentina.it/blog the server respond with a 404 error..

The unique workaround I found is changing the default DocumentRoot directive in httpd.conf in "/home/pavonic/local.sentina.it".

I seems strange for me.

Is there something wrong in configuration?

Thanks,
Cristian
pavonic
 
Posts: 2
Joined: 15. February 2006 12:20

Re: localhost and virtualhost configuration

Postby skuipers » 19. February 2006 15:27

pavonic wrote:With XAMPP1.5.1 the configuration above doesn't work any more (I've moved lines above in the extra/httpd-vhosts.conf).

Do you have httpd-vhosts.conf enabled in httpd-conf (around line 473)?
skuipers
 
Posts: 99
Joined: 21. January 2005 16:27
Location: The Netherlands

Postby pavonic » 23. February 2006 11:26

You're right!.

I've forgotten to enable that file in the main httpd.conf.

Thank you!

Cristian
pavonic
 
Posts: 2
Joined: 15. February 2006 12:20


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 10 guests