You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ugunja ugunja <ug...@hotmail.com> on 2005/01/25 19:14:28 UTC

[users@httpd] Accessing web pages on tthe server by domain name.

Hello,
I have apache running on FC1 and I acan access the web pages by ip address 
of the server http://192.168.0.x but I am unable to configure the server so 
that I can access the web pages by domain name e.g. http://www.mydomain.com. 
Any help how to configure it?

Thanks
rusel

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Accessing web pages on tthe server by domain name.

Posted by Evan Smith <es...@patsblacktown.nsw.edu.au>.
look in the apache docs under name based virtual hosting


On 26/01/2005, at 5:14 AM, ugunja ugunja wrote:

> Hello,
> I have apache running on FC1 and I acan access the web pages by ip 
> address of the server http://192.168.0.x but I am unable to configure 
> the server so that I can access the web pages by domain name e.g. 
> http://www.mydomain.com. Any help how to configure it?
>
> Thanks
> rusel
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's 
> FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Accessing web pages on tthe server by domain name.

Posted by Dick Davies <ra...@hellooperator.net>.
* Anthony G. Atkielski <an...@atkielski.com> [0117 20:17]:
> ugunja ugunja wrote:
> 
> >Hello,
> >I have apache running on FC1 and I acan access the web pages by ip address
> >of the server http://192.168.0.x but I am unable to configure the server so
> >that I can access the web pages by domain name e.g. http://www.mydomain.com.
> >Any help how to configure it?

While the below is all true, you should still get the IP if using any DNS
entry that points to the server. This smells like a DNS issue.
 
> Use NameVirtualHost to specify the IP address(es) on which you want to
> handle name-based hosts, like this:

-- 
'Yeah, life is hilariously cruel.'
		-- Bender
Rasputin :: Jack of All Trades - Master of Nuns

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Accessing web pages on tthe server by domain name.

Posted by "Anthony G. Atkielski" <an...@atkielski.com>.
ugunja ugunja wrote:

>Hello,
>I have apache running on FC1 and I acan access the web pages by ip address
>of the server http://192.168.0.x but I am unable to configure the server so
>that I can access the web pages by domain name e.g. http://www.mydomain.com.
>Any help how to configure it?

Use NameVirtualHost to specify the IP address(es) on which you want to
handle name-based hosts, like this:

NameVirtualHost 123.123.120.123

You can put an asterisk if you want to accept named-based requests on
all IP addresses.

You then specify specific addresses in <VirtualHost> sections for each
domain name, and you use ServerName to say which host is served by which
section.  For example (this is how my configuration does it):

NameVirtualHost *:80  [anything on port 80 can be name based]
...
<VirtualHost *:80>  [first domain to be served]
ServerName www.myfirstdomain.com  [domain name to be served]
...
</VirtualHost>

<VirtualHost *:80>  [second domain to be served]
ServerName www.myseconddomain.com  [domain name to be served]
...
</VirtualHost>

The first virtual host is the one that gets served if Apache can't find
a match on the server name for any virtual host.  In the above
configuration, Apache accepts any request on any IP address, provided
it's for port 80.  It then looks down the list of virtual hosts and
picks the one that has a ServerName or ServerAlias that matches the
domain name provided by the calling client, and serves that (if none
match, the first virtual host is served).

-- 
Anthony



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Accessing web pages on tthe server by domain name.

Posted by dan <in...@hostinthebox.net>.
Joshua Slive wrote:
> On Tue, 25 Jan 2005 18:14:28 +0000, ugunja ugunja
> <ug...@hotmail.com> wrote:
> 
>>Hello,
>>I have apache running on FC1 and I acan access the web pages by ip address
>>of the server http://192.168.0.x but I am unable to configure the server so
>>that I can access the web pages by domain name e.g. http://www.mydomain.com.
>>Any help how to configure it?
> 
> 
> Most likely this has nothing to do with apache configuration and
> everything to do with DNS configuration.  You need to setup DNS to map
> your hostname to your IP address.  You'd probably have better luck
> getting information about that on a redhat-specific forum.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

Have you tried to do anything as far as resolve the domain itself?  If 
you have bind tools installed, a simple "host domain.tld" will return an 
IP address.  If not, try to ping it, see what IP the domain resolves to. 
  If it does not resolve to an IP, then you have a DNS issue.  If it 
does, then you more than likely have an Apache issue, and should heed 
the advice of Evan Smith who mentioned documentation on Name-based 
Virtual Hosting.

Thanks
-dant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Accessing web pages on tthe server by domain name.

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 25 Jan 2005 18:14:28 +0000, ugunja ugunja
<ug...@hotmail.com> wrote:
> Hello,
> I have apache running on FC1 and I acan access the web pages by ip address
> of the server http://192.168.0.x but I am unable to configure the server so
> that I can access the web pages by domain name e.g. http://www.mydomain.com.
> Any help how to configure it?

Most likely this has nothing to do with apache configuration and
everything to do with DNS configuration.  You need to setup DNS to map
your hostname to your IP address.  You'd probably have better luck
getting information about that on a redhat-specific forum.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org