-4

I am trying to set up a subdomain that serves a different website that what my main domain name serves. I am using Debian Stretch.

www.domain.name > my website
application.domain.name > separate application

I read up about virtual hosts, but it seems to only specify for completely different domain names. Are there any meaningful differences and how should I configure my A records as well? I am very new to website hosting and any advice is appreciated.

1
  • 1
    Those are completely different names. I'm not sure what your question is? Oct 18, 2018 at 4:19

2 Answers 2

0

It's the same whether the second website is in the same domain or a completely different one.

0

Straight from the apache examples page

# Ensure that Apache listens on port 80
Listen 80
<VirtualHost *:80>
    DocumentRoot "/www/example1"
    ServerName www.example.com

    # Other directives here
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/www/example2"
    ServerName www.example.org

    # Other directives here
</VirtualHost>

Reference -> https://httpd.apache.org/docs/2.4/vhosts/examples.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .