This is a discussion on Don't want www in URL within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi Apache Gurus, I'm trying to set up our website such that it can be accessed using the domain ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Apache Gurus,
I'm trying to set up our website such that it can be accessed using the domain name only, and without having to use the "www." before the domain name. It seems to me that I should be able to accomplish this either through DNS, or httpd.conf, but haven't been able to figure it out yet. I'm running RH9, with Apache. Any suggestions?? |
|
|||
|
cktech@charter.net (Charles Kendricks) wrote:
> I'm trying to set up our website such that it can be accessed using >the domain name only, and without having to use the "www." before the >domain name. It seems to me that I should be able to accomplish this >either through DNS, or httpd.conf, but haven't been able to figure it >out yet. I'm running RH9, with Apache. Any suggestions?? You'll have to check both, your DNS and httpd.conf. In httpd.conf look for the "ServerName" directive and change its value. For DNS, I don't know enough to help you. You might want to ask in some DNS specific group and I guess it also depends on the DNS daemon used. Regards, johannes |
|
|||
|
Charles Kendricks wrote:
> Hi Apache Gurus, > > I'm trying to set up our website such that it can be accessed using > the domain name only, and without having to use the "www." before the > domain name. It seems to me that I should be able to accomplish this > either through DNS, or httpd.conf, but haven't been able to figure it > out yet. I'm running RH9, with Apache. Any suggestions?? May need to do some router work... httpd.conf: change "ServerName www.example.com" to "ServerName example.com" Then for the DNS part, if you have other services on different servers running under the domain name without using A records (ie - "www", "mail", etc.), then you will need to do some kind of port forwarding for port 80 of the current exaple.com server to forward requests to the web server via IP address. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended. |
|
|||
|
On Mon, 26 Jul 2004, Justin Koivisto wrote:
> Charles Kendricks wrote: > > Hi Apache Gurus, > > I'm trying to set up our website such that it can be accessed using > > the domain name only, and without having to use the "www." before the > > domain name. It seems to me that I should be able to accomplish this > > either through DNS, or httpd.conf, but haven't been able to figure it > > out yet. I'm running RH9, with Apache. Any suggestions?? > > May need to do some router work... > > httpd.conf: change "ServerName www.example.com" to "ServerName example.com" > > Then for the DNS part, if you have other services on different servers running > under the domain name without using A records (ie - "www", "mail", etc.), then > you will need to do some kind of port forwarding for port 80 of the current > exaple.com server to forward requests to the web server via IP address. The above is incomplete, but is on the right track. I allow a leading "www" on requests to my server, but ignore it. It should probably be inside a virtual host construct. ServerName: example.com (as above) ServerALIAS: www.example.com (and any other aliases) UseCanonicalName: ON - That forces the rewritten domain name into the HTTP response. However, watch out for other side effects. DNS Records: www.example.com. IN CNAME example.com. ; ONLY record for www.* example.com. IN A 10.0.0.0 ; Real IP address goes here. (That's what is needed for what the other response calls "port forwarding.") |
| Thread Tools | |
| Display Modes | |
|
|