Control Web Panel

WebPanel => Apache => Topic started by: mrnovo on November 09, 2020, 10:22:22 PM

Title: FTP subdomain serving root webpage ?
Post by: mrnovo on November 09, 2020, 10:22:22 PM
Hi,

Recently i've moved to CWPPro, today i noticed that ftp.domain.com serving web site from domain.com. Not forwarding.

Not only FTP subdomain. Here some info:

- I've added 10 IP addresses to my server. 1.1.1.1 is my main shared ip
- I've created 2 accounts on 1.1.1.2 (firstdomain.com, seconddomain.com)
- When i visit ftp.firstdomain.com or ftp.seconddomain.com, firstdomain.com web page is served. All links working.
- Also not only FTP subdomain. Any A record that points to 1.1.1.2 but does not have a folder, serves firstdomain.com
- Besides all these, if i visit 1.1.1.2 same thing happens.

I'm using apache as webserver.

Anyone can help ?

Regards.
Title: Re: FTP subdomain serving root webpage ?
Post by: mrnovo on November 09, 2020, 11:14:12 PM
Another info i missed,

1.1.1.2 forwards me to firstdomain.com
Title: Re: FTP subdomain serving root webpage ?
Post by: studio4host on November 12, 2020, 04:55:35 PM
you probably have some configuration mixed or you are talking about https as in a case some domain has no https the ssl of the first domain on the same will be serverd (that is a default webserver behavior)
Title: Re: FTP subdomain serving root webpage ?
Post by: mrnovo on November 14, 2020, 04:31:51 PM
I dont know if its a missconfiguration but i think its about shared IPs.

I've fixed this by adding my shared ips to sharedips.conf in apache.