How to Create a VirtualHost on the Linux version of XAMPP


In this tutorial we will learn how to create a VirtualHost on the Linux version of XAMPP. With this VirtualHost we no longer need to access the project by accessing http://localhost/folderproject/ but simply with a hostname similar to the domain name, for example http://blog.dev. Usually someone also creates a web project folder in a sub-folder so the address to access it is longer http://localhost/project/subproject.

This tutorial uses:
* Ubuntu Linux distributions Di
* XAMPP for Linux 5.6.3-0

VirtualHost Description:
* Host blog.dev
* Folder location /opt/lampp/htdocs/blog

Edit hosts file

Add hostname according to ServerName in virtual host configuration

Edit apache configuration file httpd.conf

Look for the line of code below, then remove the # sign

Edit virtual hosts configuration file

Add virtual host on the bottom line
Hostname blog.dev
The location of the root folder is in /opt/lampp/htdocs/dev

Restart xampp server

Now try to access the hostname blog.dev

good luck

Support this blog by donating via Trakteer.id, PayPal, or Jenius Pay $musaamine.

Related Posts:

  • How to Install and Setting XAMPP for Linux
  • How to Install HTTPS on localhostHow to Install HTTPS on localhost
  • How to Online Localhost (Local Server)How to Online Localhost (Local Server)
  • How to Install Nextcloud Cloud Storage Server on UbuntuHow to Install Nextcloud Cloud Storage Server on Ubuntu
  • [Linux]  How to Install MariaDB 10 on Ubuntu 16.04[Linux] How to Install MariaDB 10 on Ubuntu 16.04

.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *