Page 1 of 1

change url of defult xampp

PostPosted: 07. November 2012 08:07
by doryshe
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

Re: change url of defult xampp

PostPosted: 07. November 2012 16:06
by Altrea
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