Home > Blockchain >  Why my subdomain shows the same content as my main domain?
Why my subdomain shows the same content as my main domain?

Time:04-03

I tried to create two virtual hosts on my Debian server, one for the main domain, and one for the subdomain. The subdomain points to a different folder than the main domain but shows the exact same content. I don't know why. Debian version: 11 I use the apache HTTP server. I created a let's encrypt certificate for the main domain, but the subdomain uses the same. The host file contains the IP-domain pairs. This is the virtual host configuration file's content, with fake domain names. Sorry, but StackOverflow can't handle the configuration code, so I had to upload an image.

enter image description here

This is the host configuration below. Of course, my_ip_address is fake data, I wrote a real IP address into the host file.

Please tell me, what causes this problem! I'd like to reach, my subdomain shows its content, not the main domain's content. Please consider, that I'm a developer, not a server administrator, so maybe I didn't use the proper phrases or jargon, but my intentions are clear. Help a clueless developer! :)

CodePudding user response:

The config looks fine, but you are talking about certificates and your config is for port 80, so maybe you are looking the wrong configuration. sorry I post this comment as an answer, but I can't comment.

  • Related