• Home
  • Geocoding
  • Nieuws
  • Contact
BackuPs.NL
  • Geocoding
  • News
    • Fiat
    • Grappige zaken
    • Software
    • Video’s
    • Wordpress
  • Contact Us
  • Geocoding
  • News
    • Fiat
    • Grappige zaken
    • Software
    • Video’s
    • Wordpress
  • Contact Us

Configuring Virtual Hosts on Xampp – How to Run Multiple Domains

4 januari 2016|Geen categorie, Internet, Software
Configuring Virtual Hosts on Xampp

There are more then one tutorial on the internet on how to configure Xampp to run more then one domain. So far I could not find one that told the complete story. So here it is:

1) In the folder where your Xampp is installed is a folder locate called apache. That folder has a subfolder called ‘conf’ which has ha subfolder called extra. In that last subfolder you will find a file called httpd-vhosts.conf

Vhosts configuration File /apache/conf/extra
The Apache Vhosts configuration File

Open that file in a text editor and
a) enable the virtual host ability by uncommenting line 20 (removing the ‘#’ in that line).

Uncomment the NameVirtualHost  Line
Uncomment NameVirtualHost

b) Add the virtual hosts code to the bottom of that same file. (You will find the code used below in the Toggle (+ sign)). Note i have my Xampp server installed in drive D:\xampp. Make sure you adjust that path when you grab the code snippet below.

Add the virtual hosts one by one
Add the virtual hosts

Now what you need to add is this code to keep the Xampp control panel alive is this:

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot D:/xampp/htdocs ServerName localhost <Directory "D:/xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>

Then for each domain you want to run on your server add this code (change the yourdomain.com to the correct domain name. I used wp.tst and wpempty.tst in my code examples).

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot D:/xampp/htdocs/yourdomain.com ServerName yourdomain.com ServerAlias www.yourdomain.com *.yourdomain.com ErrorLog "logs/yourdomain.com-error.log" CustomLog "logs/yourdomain.com-access.log" common <Directory "D:/xampp/htdocs/yourdomain.com"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>

Click on the plus sign for 'The Code Used'

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot D:/xampp/htdocs ServerName localhost <Directory "D:/xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot D:/xampp/htdocs/wp.tst ServerName wp.dev ServerAlias www.wp.tst *.wp.tst ErrorLog "logs/wp.tst-error.log" CustomLog "logs/wp.tst-access.log" common <Directory "D:/xampp/htdocs/wp.tst"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot D:/xampp/htdocs/wpempty.tst ServerName wpempty.dev ServerAlias www.wpempty.tst *.wpempty.tst ErrorLog "logs/wpempty.tst-error.log" CustomLog "logs/wpempty.tst-access.log" common <Directory "D:/xampp/htdocs/wpempty.tst"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>

Save the file.

2) Change the windows host file. Now in order to be able to call the website in your web browser you need to adjust the host file of your windows install. The file can be located in C:\windows\system32\drivers\etc

Note : if your windows is not installed on the C-drive change the c:\ into the correct drive letter of your install.

Modify the windows Host File
Modify the windows Host File

Add, in this case as i have created two virtual servers, two lines
127.0.0.1 wp.tst
127.0.0.1 wpempty.tst

Adjusted Host file
Adjusted Host file

3) now Stop the Apache server and restart it again in the Xampp controll panel.

4) install your wordpress or whatever website cms in those folders.  You need to create the subfolders in D:/xampp/htdocs first!!!

5) Open the browser and just type in http://wp.tst or http://wpdempty.tst

6) If your xampp is installed on drive C: just replace D:/ for C:/ in all code snippets given.

If all has been setup correctly you will see the website wordpress install or website cms system you installed.

NOTE: In the latest browsers you can’t use the .DEV extension for a development website as they will force to https:// because of that extension.  Change the extension to anything else like .tst and it will work fine with http://wp.tst

UPDATE: The code examples have been changed to .tst extension but the images not. I apologise for that. The tutorial works just fine.

16 juli 2023 BackuPs

Recent News

  • Why am I Not Getting the Windows 10 November 2015 Update? Install it manually?
    Why am I Not Getting the Windows 10 November 2015 Update? Install it manually? 23 december 2015

    Beginning november 2015 Microsoft released the first major update for Windows 10...

  • Google mobile friendly misleads Webmasters
    Google mobile friendly misleads Webmasters 22 maart 2015

    Google was recently sending me messages in my webmaster account that my website...

  • Wordpress  revealing username by login trial and error
    Wordpress revealing username by login trial and error 6 maart 2014

    Security Problem : In any wordpress version it is possible to get a valid loginn...

  • Wordpress changing the admin-ID or hide author pages?
    Wordpress changing the admin-ID or hide author pages? 8 oktober 2013

    In wordpress you can easily change the admin id to a name which is less hackable...

  • Fiat Punto Evo, Grande Punto, Punto probleem ruitensproeier / ruitenwisser
    Fiat Punto Evo, Grande Punto, Punto probleem ruitensproeier / ruitenwisser 12 maart 2012

    Punto, Grande Punto, Punto Evo Fiat heeft een aantal auto’s op de markt ge...

Tag cloud

Fabricagefout Punto bankieren Ruitensproeier Grappig Video Youtube Funstuff Raadsel Caelo Surfing aziaten Loso Outlook westerlingen Grande Punto admin Evo Problemen Voorruit Thaise hacken Muziek Software Stealth Sek Loso authorisatie Internet Fiat Fabrieksfout loginname Probleem Animatie Carabao Ontwerpfout admin id Invisible Thai

Laatste nieuws

  • Why am I Not Getting the Windows 10 November 2015 Update? Install it manually?
    Why am I Not Getting the Windows 10 November 2015 Update? Install it manually?

    Beginning november 2015 Microsoft released the first major update for Windows 10...

  • Google mobile friendly misleads Webmasters
    Google mobile friendly misleads Webmasters

    Google was recently sending me messages in my webmaster account that my website...

  • Wordpress  revealing username by login trial and error
    Wordpress revealing username by login trial and error

    Security Problem : In any wordpress version it is possible to get a valid loginn...

Tag cloud

Sek Loso Loso admin id Voorruit Probleem Internet Grande Punto Thai Invisible Caelo Funstuff Fiat Software Evo Video Fabricagefout admin Raadsel Grappig bankieren Thaise Muziek Stealth hacken loginname Punto Outlook westerlingen Carabao Problemen Fabrieksfout Youtube Surfing Ruitensproeier aziaten Ontwerpfout authorisatie Animatie

Popular News

  • Fiat Punto Evo, Grande Punto, Punto probleem ruitensproeier / ruitenwisser
    Fiat Punto Evo, Grande Punto, Punto probleem ruitensproeier / ruitenwisser 12 maart 2012
  • Westerlingen versus Aziaten
    Westerlingen versus Aziaten 30 november 2011
  • Het mysterie van de deur
    Het mysterie van de deur 30 november 2011
Volg mij via EmailVolg mij via X
Copyright
webontwerp door BackuPs