<br>How can I configure apache so that the url can be received with or without the www. in front<br><br>Also, how can I make this:<br>url=news.domain.com ---> contents in --> domain.com/news<br><br>is this related to aliases? How?<br><br>thank you.
To configure apache to take news.domain.com from /domain/news, all you need to do is to set up a virtual server. <br><br>You need something like this in http.conf:<br>NameVirtualHost 192.168.1.1<br><br><VirtualHost 192.168.1.1><br>DocumentRoot /domain/
Yes, this is something I know.<br>My problem is a more complicated ... I guess!<br><br>I want to make sure that people asking for <br><br>whatever.domain.com automatically display the relative sub directory contents (domain/
This can also be corrected at your domain manager, i.e., with the interface you use to manage your DNS with your registrar. You redirect *.domain.com to
until you set up the host name on your dns server or add it to your hosts file (which works for testing, but not for production).
Once that is handled, then you should generally be able to connect to the web server with any host name, unless you set up virtual hosts.
Without virtual hosts, it will post the document root to anyone who connects to that system on port 80. With virtual hosts, the page that displays depends on either which ip address you connect to (e.g., intranet vs extranet) or what the fqdn is (e.g.,
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.