I have multiple sites deployed on xampp
. For now, all of the sites are using one port i.e. 80
. For this reason, whenever I am logged into one of the sites, I am automatically logged out from the other and vice versa. I have looked at this article to How to run multiple websites on XAMPP on Windows. And tried to follow it but I am unable to do the needful.
I have added one more port to listen
Listen 80
Listen 8080
In my httpd-vhosts.conf
I have done the following
NameVirtualHost *:8080
<VirtualHost *:8000>
DocumentRoot "F:\xampp\htdocs\mdc"
ServerName localhost:8080
<\VirtualHost>
After doing this I have turned off my xampp and then tried to restart apache
and mysql
. But apache is not starting
My URL is http://localhost:8080/mdc/backend/web
Note: Without doing any virtual host setting the above URL is accessible on both 80
and 8080
ports
Update 1
Herer is my httpd.conf file
This is not a fix for your issue, Here i will explain how i manage multiple websites on xampp.
First i assumes that your using
windows
i always use the same port with different server names.
on :
E:\xampp\apache\conf\extra\httpd-vhosts.conf
(In my case i installed xampp on E drive) i added this codeAnd on (
C:\Windows\System32\drivers\etc\hosts
) my windows host file i added this linesWith this approach you can access the site with a clean readable URLs
In this case if you want to see the first site just enter this URL
mysite1.flames.com
on browser.Cheers