Vote Up 0 Vote Down

create subdomain in xampp linux

How to create a subdomain in localhost xampp which is in linux os ?


Vote Up 1 Vote Down
* 1:*

Edit the httpd.conf in /opt/lampp/etc/ (In the localation differs) to the following :


DocumentRoot "/opt/lampp/htdocs"
ServerName localhost

DocumentRoot "/opt/lampp/htdocs/projects/my_subdomain_directory"
ServerName mysubdomain.localhost

* 2:*

Edit the **hosts** in /etc to following mysubdomain.localhost

Step 3:
Restart xampp using

/opt/lampp/lampp restart

Step 4:

Open the following link in the browser to see your subdomain.

flag | link |

Your Answer

Login before answering

Login with facebook