You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by eric lin <fs...@centurytel.net> on 2002/12/24 15:49:07 UTC

[users@httpd] webserver using name based virtual hosts, make problem

Dear Bernd Eckenfels or apache webserver user:


On Tue, Dec 24, 2002 at 04:51:04AM -0700, eric lin wrote:

 >>   Do you know why in the html code to show photo by
 >> <img src="http://12.34.56.78/photo.gif or jpg"> work but
 >> <img src="http://www.domain.com/photo.gif or jpg"> not work?


you are totally in the wrong list, but anyway:

eighter www.domain.com does not resolv to 12.34.56.78 or you web server is
using name based virtual hosts. The ip does match the default host, the name
does match another one.

If you want us to help you need to provide real address, real error messages
and a description of your network.

Do you use proxies? Firewalls? What kind of firewall? What happens if you
directly type the images address (both) in your browser?

Greetings
Bernd
------------------------

please help on "The ip does match the default host, but the name does 
match another one."

I have some related lines about this in my /etc/apache/httpd.conf

-----------------------------------------

# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e. use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't 
understand
# this, ask your network administrator.

ServerName  www.linuxspice.com

# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a url that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname:port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGIs.
UseCanonicalName on

---------

MaxClients 150

# MaxRequestsPerChild: the number of requests each child process is
#  allowed to process before the child dies.
#  The child will exit so as to avoid problems after prolonged use when
#  Apache (and maybe the libraries it uses) leak.  On most systems, this
#  isn't really needed, but a few (such as Solaris) do have notable leaks
#  in the libraries.

MaxRequestsPerChild 30


# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost command

#Listen 3000
Listen 64.91.61.186:80


# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.

DocumentRoot /var/www
---------
Please help again, thanks in advance


-- 
Sincere Eric
www.linuxspice.com
linux pc for sale


---------------------------------------------------------------------
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] webserver using name based virtual hosts, make problem

Posted by JDeSalle <jd...@earthlink.net>.
Dear Eric Lin,

I have the solution for you.

Solution #1
1. Don't tell people they are on the wrong list.
2. You have been on the wrong list for months.
3. Get IIS, it's plug and play.

Solution #2
1. Go to www.clue.com and get a "ClueBat"
2. Every time you feel you need to post something to this list.
3. Smack yourself with the Cluebat first and then post your message.

jd







eric lin wrote:

> Dear Bernd Eckenfels or apache webserver user:
>
>
> On Tue, Dec 24, 2002 at 04:51:04AM -0700, eric lin wrote:
>
> >>   Do you know why in the html code to show photo by
> >> <img src="http://12.34.56.78/photo.gif or jpg"> work but
> >> <img src="http://www.domain.com/photo.gif or jpg"> not work?
>
>
> you are totally in the wrong list, but anyway:
>
> eighter www.domain.com does not resolv to 12.34.56.78 or you web 
> server is
> using name based virtual hosts. The ip does match the default host, 
> the name
> does match another one.
>
> If you want us to help you need to provide real address, real error 
> messages
> and a description of your network.
>
> Do you use proxies? Firewalls? What kind of firewall? What happens if you
> directly type the images address (both) in your browser?
>
> Greetings
> Bernd
> ------------------------
>
> please help on "The ip does match the default host, but the name does 
> match another one."
>
> I have some related lines about this in my /etc/apache/httpd.conf
>
> -----------------------------------------
>
> # ServerName allows you to set a host name which is sent back to 
> clients for
> # your server if it's different than the one the program would get 
> (i.e. use
> # "www" instead of the host's real name).
> #
> # Note: You cannot just invent host names and hope they work. The name 
> you
> # define here must be a valid DNS name for your host. If you don't 
> understand
> # this, ask your network administrator.
>
> ServerName  www.linuxspice.com
>
> # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
> # Apache needs to construct a self-referencing URL (a url that refers 
> back
> # to the server the response is coming from) it will use ServerName and
> # Port to form a "canonical" name.  With this setting off, Apache will
> # use the hostname:port that the client supplied, when possible.  This
> # also affects SERVER_NAME and SERVER_PORT in CGIs.
> UseCanonicalName on
>
> ---------
>
> MaxClients 150
>
> # MaxRequestsPerChild: the number of requests each child process is
> #  allowed to process before the child dies.
> #  The child will exit so as to avoid problems after prolonged use when
> #  Apache (and maybe the libraries it uses) leak.  On most systems, this
> #  isn't really needed, but a few (such as Solaris) do have notable leaks
> #  in the libraries.
>
> MaxRequestsPerChild 30
>
>
> # Listen: Allows you to bind Apache to specific IP addresses and/or
> # ports, in addition to the default. See also the VirtualHost command
>
> #Listen 3000
> Listen 64.91.61.186:80
>
>
> # DocumentRoot: The directory out of which you will serve your
> # documents. By default, all requests are taken from this directory, but
> # symbolic links and aliases may be used to point to other locations.
>
> DocumentRoot /var/www
> ---------
> Please help again, thanks in advance
>
>




---------------------------------------------------------------------
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


[users@httpd] Re: webserver using name based virtual hosts, make problem

Posted by eric lin <fs...@centurytel.net>.
Bernd Eckenfels wrote:
> Hello,
> 
> your apache config does not contain named virtual hosts, so your problem is
> in the fact that the ip for:
> 
> 
> 
>>ServerName  www.linuxspice.com
> 
> 
> is not
> 
> 
>>Listen 64.91.61.186:80
> 
> 
> So this means if you specify http://www.linuxspice.com/case.jpg it will not be the
> same as http://64.91.61.186/case.jpg, unless you are on a host which has set up this
> wrong name mapping, because it is http://63.85.86.80/case.jpg.
> 
> Greetings
> Bernd
so if I want that <img src="http://www.linuxspice.com/case.jpg">
showed photo in finitesite.com/fsshl

I need to modify my httpd.conf

----------------
# VirtualHost: Allows the daemon to respond to requests for more than one
# server address, if your server machine is configured to accept IP packets
# for multiple addresses. This can be accomplished with the ifconfig
# alias flag, or through kernel patches like VIF.

# Any httpd.conf or srm.conf directive may go into a VirtualHost command.
# See also the BindAddress entry.

#<VirtualHost host.some_domain.com>
#ServerAdmin webmaster@host.some_domain.com
#DocumentRoot /var/www/host.some_domain.com
#ServerName host.some_domain.com
#ErrorLog /var/log/apache/host.some_domain.com-error.log
#TransferLog /var/log/apache/host.some_domain.com-access.log
#</VirtualHost>
-- 
is this part need to be modify?

if so, should I do this?
-------------
<VirtualHost www.linuxspice.com
DocumentRoot /var/www/
ServerNmae www.linuxspice.com
</VirtualHost>

---------------
that is in the last part of my httpd.conf

please help again, thanks in advance


Sincere Eric
www.linuxspice.com
linux pc for sale


---------------------------------------------------------------------
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