com and .co.uk domains, is it possible to create a virtual host to point to a single directory on the box?
At present I have
<VirtualHost *:80> ServerName www.domain.co.uk ServerAlias domain.co.uk DocumentRoot "C:/htdocs/domain.com/htdocs" <Directory /> Options +Includes </Directory> ErrorLog "C:/htdocs/domain.co.uk/logs/error.log" CustomLog "C:/htdocs/domain.co.uk/logs/access.log" combined
Yes just add them to your ServerAlias
ServerAlias domain.co.uk www.domain.com domain.com
Or you could do it like this:
ServerName domain.co.uk ServerAlias *.domain.co.uk domain.com *.domain.com
I think you have som inconsistency problems with your posted code. Using both
If it was up to me. I would put everything in
C:/htdocs/domain.com/ and use the following
<VirtualHost *:80> ServerName domain.com ServerAlias *.domain.com domain.co.uk *.domain.co.uk DocumentRoot "C:/htdocs/domain.com/htdocs" <Directory /> Options +Includes </Directory> ErrorLog "C:/htdocs/domain.com/logs/error.log" CustomLog "C:/htdocs/domain.com/logs/access.log" combined </VirtualHost>
Please note, when using
*.domain.com (star-alias) in ServerAlias. If you wish to add a specific subdomain (example delicious-subs.domain.co.uk) in a new VirtualHost – pointing to another location. Then you will have to add that new VirtualHost with above/before the VirtualHost using the star-alias.
Leave a comment
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?