You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "C. Benson Manica" <cb...@gmail.com> on 2008/03/14 21:20:08 UTC

[users@httpd] Server_Name not being set by httpd.conf

I'm new to Apache, and I'm trying to set up a simple web server.  It so
happens that my domain isn't set up yet, so my server is at 66.23.224.5 for
the time being.  I've only minimally modified httpd.conf to get things set
up, and in particular I have the line

ServerName 66.23.224.5:80

which as far as I can tell should cause the SERVER_NAME environment variable
to be set.  Unfortunately, the environment script says otherwise:

COMSPEC="C:\WINDOWS\system32\cmd.exe"
DOCUMENT_ROOT="C:/www"
GATEWAY_INTERFACE="CGI/1.1"
HTTP_ACCEPT="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
HTTP_ACCEPT_CHARSET="ISO-8859-1,utf-8;q=0.7,*;q=0.7"
HTTP_ACCEPT_ENCODING="gzip,deflate"
HTTP_ACCEPT_LANGUAGE="en-us,en;q=0.5"
HTTP_CACHE_CONTROL="max-age=0"
HTTP_CONNECTION="keep-alive"
HTTP_HOST="localhost"
HTTP_KEEP_ALIVE="300"
HTTP_USER_AGENT="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"
PATH="C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\GTK\2.0\bin;C:\Program
Files\Jahshaka\..\gtk2\bin;C:\Program
Files\Jahshaka\..\mlt\bin;C:\Program
Files\OpenLibraries\bin;C:\Program
Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 6.0\bin"
PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"
QUERY_STRING=""
REMOTE_ADDR="127.0.0.1"
REMOTE_PORT="4093"
REQUEST_METHOD="GET"
REQUEST_URI="/cgi-bin/printenv.pl"
SCRIPT_FILENAME="C:/Program Files/Apache Software
Foundation/Apache2.2/cgi-bin/printenv.pl"
SCRIPT_NAME="/cgi-bin/printenv.pl"
SERVER_ADDR="127.0.0.1"
SERVER_ADMIN="webmaster@theuntaintedsky.org"
SERVER_NAME="localhost"
SERVER_PORT="80"
SERVER_PROTOCOL="HTTP/1.1"
SERVER_SIGNATURE=""
SERVER_SOFTWARE="Apache/2.2.8 (Win32)"
SYSTEMROOT="C:\WINDOWS"
WINDIR="C:\WINDOWS"

You can clearly see that the httpd.conf file is being parsed and applied -
otherwise SERVER_ADMIN would be the default and not what I set it to.  So
what am I missing about SERVER_NAME (and HTTP_HOST, for that matter)?

-- 
C. Benson Manica
cbmanica@gmail.com

Re: [users@httpd] Server_Name not being set by httpd.conf

Posted by Craig Huffstetler <cr...@gmail.com>.
I would take it to the MoveableType forum.

However, my input based on the discussion thus far:

In your configuration files for MovableType:

--> localhost should work in almost all cases or the IP address
127.0.0.1for your installation if it is on the local machine and the
database (which
I am also assuming you are refrencing) are local.

--> Also make sure the logins are valid and the passwords are valid for the
installation of MoveableType you are referencing. Please also make sure the
permissions for the "CGI applications" references are correct (most likely
777) so that your server can execute them properly and the directories have
read/write/execute permissions if need be.

Otherwise, it may be an issue with MT...

Sincerely,

Craig Huffstetler

On Sun, Mar 16, 2008 at 9:26 PM, C. Benson Manica <cb...@gmail.com>
wrote:

> Ok, thanks for clarifying that.  Another question: I have a set of CGI
> applications (MovableType to be specific) and even after fixing SERVER_NAME,
> these CGI's seem to be confused about whether the self-referential links
> they generate should point to localhost (no) or to my domain (yes).  Are
> there any other Apache settings I should verify before taking this to a
> MovableType forum?
>
>
> On Sun, Mar 16, 2008 at 10:06 PM, Eric Covener <co...@gmail.com> wrote:
>
> > On Sun, Mar 16, 2008 at 8:34 PM, C. Benson Manica <cb...@gmail.com>
> > wrote:
> > > That fixes SERVER_NAME - but it doesn't change HTTP_HOST.  Should I
> > care
> > > that HTTP_HOST still is set to localhost?
> >
> > That's reflecting the value passed in via the browser, not derived
> > from your apache/system config.
> >
> > --
> > Eric Covener
> > covener@gmail.com
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
> --
> C. Benson Manica
> cbmanica@gmail.com
>

Re: [users@httpd] Server_Name not being set by httpd.conf

Posted by "C. Benson Manica" <cb...@gmail.com>.
Ok, thanks for clarifying that.  Another question: I have a set of CGI
applications (MovableType to be specific) and even after fixing SERVER_NAME,
these CGI's seem to be confused about whether the self-referential links
they generate should point to localhost (no) or to my domain (yes).  Are
there any other Apache settings I should verify before taking this to a
MovableType forum?

On Sun, Mar 16, 2008 at 10:06 PM, Eric Covener <co...@gmail.com> wrote:

> On Sun, Mar 16, 2008 at 8:34 PM, C. Benson Manica <cb...@gmail.com>
> wrote:
> > That fixes SERVER_NAME - but it doesn't change HTTP_HOST.  Should I care
> > that HTTP_HOST still is set to localhost?
>
> That's reflecting the value passed in via the browser, not derived
> from your apache/system config.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
C. Benson Manica
cbmanica@gmail.com

Re: [users@httpd] Server_Name not being set by httpd.conf

Posted by Eric Covener <co...@gmail.com>.
On Sun, Mar 16, 2008 at 8:34 PM, C. Benson Manica <cb...@gmail.com> wrote:
> That fixes SERVER_NAME - but it doesn't change HTTP_HOST.  Should I care
> that HTTP_HOST still is set to localhost?

That's reflecting the value passed in via the browser, not derived
from your apache/system config.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] Server_Name not being set by httpd.conf

Posted by "C. Benson Manica" <cb...@gmail.com>.
That fixes SERVER_NAME - but it doesn't change HTTP_HOST.  Should I care
that HTTP_HOST still is set to localhost?

On Fri, Mar 14, 2008 at 5:10 PM, Eric Covener <co...@gmail.com> wrote:

> On Fri, Mar 14, 2008 at 4:20 PM, C. Benson Manica <cb...@gmail.com>
> wrote:
> > I'm new to Apache, and I'm trying to set up a simple web server.  It so
> > happens that my domain isn't set up yet, so my server is at 66.23.224.5for
> > the time being.  I've only minimally modified httpd.conf to get things
> set
> > up, and in particular I have the line
> >
> > ServerName 66.23.224.5:80
>
> > SERVER_NAME="localhost"
>
>
> UseCanonicalName?
>
> http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
C. Benson Manica
cbmanica@gmail.com

Re: [users@httpd] Server_Name not being set by httpd.conf

Posted by Eric Covener <co...@gmail.com>.
On Fri, Mar 14, 2008 at 4:20 PM, C. Benson Manica <cb...@gmail.com> wrote:
> I'm new to Apache, and I'm trying to set up a simple web server.  It so
> happens that my domain isn't set up yet, so my server is at 66.23.224.5 for
> the time being.  I've only minimally modified httpd.conf to get things set
> up, and in particular I have the line
>
> ServerName 66.23.224.5:80

> SERVER_NAME="localhost"


UseCanonicalName?

http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname

-- 
Eric Covener
covener@gmail.com

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