change url of defult xampp

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

change url of defult xampp

Postby doryshe » 07. November 2012 08:07

Hi

I installed xampp 1.8.1 on server windows server 2003.
when i enter the joomla site i need to enter the site http://servername\joomla.
when I enter the http://servername I see the xampp configuration.

how can i configure that i enter http://servername and it open in joomla site.

Doron
doryshe
 
Posts: 1
Joined: 07. November 2012 07:52
XAMPP Version: 5.6.3
Operating System: windows server 2003

Re: change url of defult xampp

Postby Altrea » 07. November 2012 16:06

Hi Doron,

You need to change the DocumentRoot setting of your Apache httpd.conf.

But the most beautiful way would be instead to create a unique VHost (with its own simulated domain name of course) for your joomla installation.
To do so, you need to:
  • add a new entry at the end of your C:\Windows\system32\drivers\etc\HOSTS\ file, e.g.:
    Code: Select all
    127.0.0.1 myjoomla

    (the HOSTS file is protected by the Windows User Account Control, so to change it you need higher administration rights)
  • edit your C:\xampp\apache\conf\extra\httpd-vhosts.conf and add two VHosts:
    Code: Select all
    # Default and localhost virtual host entry
    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs"
        ServerName localhost
        ErrorLog "logs/default.localhost-error.log"
        CustomLog "logs/default.localhost-access.log" combined
    </VirtualHost>

    # myjoomla virtual host entry
    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs/joomla"
        ServerName myjoomla
        ErrorLog "logs/myjoomla-error.log"
        CustomLog "logs/myjoomla-access.log" combined
    </VirtualHost>
  • save the file and restart Apache

The VHost solution only works on the computer where XAMPP is installed and running on.
If you want to use simulated Domain Names on other computers too, you need to add HOSTS entrys on each of these systems too, like so:
Code: Select all
123.123.123.123 myjoomla

(replace 123.123.123.123 with the IP of your XAMPP server)

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6630
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: Nobbie, studio_two and 68 guests