Setting up virtual host on XAMPP

17,442

You should use /opt/lampp/etc/extra/httpd-vhosts.conf, but before you should add your servername to your .hosts file and uncomment inclusion of of the httpd-vhosts.conf in the /opt/lampp/etc/httpd.conf.

Share:
17,442
Alan
Author by

Alan

Updated on July 23, 2022

Comments

  • Alan
    Alan almost 2 years

    I've installed XAMPP on Ubuntu in '/opt/lampp' directory and would like to set up some VirtualHosts. Apache Virtual Host tutorial instructs to place

    <VirtualHost *:80>
    ...
    </VirtualHost>
    

    code in '/etc/apache2/sites-available/[virtualhostname].conf'. The problem is that I don't have 'apache2' folder in '/etc'. I also don't have 'sites-available' directory in '/opt/lampp/apache2'.

    I have '/opt/lampp/etc/httpd.conf' and '/opt/lampp/etc/extra/httpd-vhosts.conf' files though. Which ones shall I use to set the VH up?