Forum Moderators: buckworks & webwork

Message Too Old, No Replies

virtual hosting and third level domains

         

decola

9:32 pm on Jun 18, 2006 (gmt 0)

10+ Year Member



Hi all!
I own the domain example.com. My wish is to implements some third level domains. So, in:
etc/apache2/sites-available
I've created some files, such as:
subdomain1.example.com
subdomain2.example.com
subdomain3.example.com

Each file contains these directives:

<VirtualHost *>
ServerName subdomainx.example.com
DocumentRoot /var/www/www.example.com/subdomainx
</VirtualHost>

Is it right? Is it a correct configuration or will I encounter some problems in the future? Is it so simple?
Do you see any security holes?

Thank you.

coopster

7:44 pm on Jun 19, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I don't usually use periods in my directory names, but that is personal preference.

At the very least though, I would limit the port in the VirtualHost container. Again, you wouldn't have to, but I prefer to do so. Why? Well, if the port is not specified then it defaults to the same port as the most recent

Listen
statement of the main server. I just like to be certain I guess:
<VirtualHost *:80>