Some of the virtual hosts are not working?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Some of the virtual hosts are not working?

Postby Kevin2046 » 23. August 2020 23:11

I'm using Ubuntu 18.04 and just upgraded XAMPP to 7.4.9. I have several subdomains, for example www.mysite.com would point to /opt/lampp/htdocs/main and sub.mysite.com would point to /opt/lampp/htdocs/sub. The httpd-vhosts.conf file includes:

<VirtualHost *:80>
ServerAdmin webmaster@mysite.com
DocumentRoot "/opt/lampp/htdocs/main"
ServerName mysite.com
ServerAlias mysite www.mysite.com m.mysite.com
ErrorLog "logs/mysite.com-error_log"
CustomLog "logs/mysite.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@mysite.com
DocumentRoot "/opt/lampp/htdocs/sub"
ServerName sub.mysite.com
ServerAlias sub.mysite.com
ErrorLog "logs/sub.com-error_log"
CustomLog "logs/sub.com-access_log" common
</VirtualHost>

I have also uncommented the Include etc/extra/httpd-vhosts.conf in the httpd.conf file.

Now the sub.mysite.com is working as expected. But the www.mysite.com just always only point to /opt/lampp/htdocs. But it was working ok in my previous installed XAMPP. What am I missing?
Kevin2046
 
Posts: 1
Joined: 23. August 2020 23:09
XAMPP version: 7.4.9
Operating System: Ubuntu

Re: Some of the virtual hosts are not working?

Postby Nobbie » 24. August 2020 10:55

for example www.mysite.com would point to /opt/lampp/htdocs/main and sub.mysite.com would point to /opt/lampp/htdocs/sub


Why "for example" and why "would point"? Does it, or does it not? And what is meant by "for example"? Is this your configuration (the original code) or is it not?

Code: Select all
ServerName sub.mysite.com
ServerAlias sub.mysite.com


Why twice the same? I dont know if that is a problem, but anyway its strange.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 72 guests