Re: [expert] Apache "SERVER_NAME" quick Q
It depends on the order you have in the nsswitch.conf file. i have in a default mdk setup: hosts: files nisplus nis dns This means that gethostname will check your hostsfiles first.. Then it'll check nis services and lastly it'll check via bind in the order you have listed your dns-hosts in resolv.conf /bo On Saturday 11 May 2002 05:14, James wrote: > That one I don't have and will have to rely on someones else to be able > to duplicate. > > James > > > On Fri, 10 May 2002 16:32:55 -0500 > > David Rankin <[EMAIL PROTECTED]> wrote: > > Hmm.., but what if I have BIND running and host.resolve set to BIND, > > hosts? > > > > James wrote: > > > Ok did a test. and got the following. > > > > > > If you have something like this in /etc/hosts. > > > > > > 10.0.0.1 my.box.com my > > > > > > where 10.0.0.1 is your IP number, my.box.com is the full name of the > > > box, and my is the nickname. hostname and hostname --fqdn work. If > > > you remove the nickname and just have > > > > > > 10.0.0.1 my.box.com > > > > > > hostname returns my.box.com and hostname --fqdn returns host unknow. > > > or if you have the default that Mandrake sets up, > > > > > > 10.0.0.1 my > > > > > > then hostname works and again hostname --fqdn returns host unkown. > > > > > > James > > > > > > On Thu, 09 May 2002 15:18:23 -0500 > > > > > > David Rankin <[EMAIL PROTECTED]> wrote: > > > > Well, I should have been more clear, and maybe the problem > > > > isn't as simple as I thought. On my 7.2 box, #ServerName > > > > your.server.name is still commented out, but apache is able to > > > > use gethostbyname() and correctly fill in the welcome screen > > > > in apache. > > > > > > > > In 8.2, something is fishy. > > > > > > > > [Skyline] # hostname > > > > Skyline.3111Skyline.com > > > > > > > > That looks OK > > > > > > > > [Skyline] # hostname --fqdn > > > > Unknown host > > > > > > > > That looks bad > > > > > > > > So it seems the problem with apache isn't with apache or > > > > httpd.conf, but rather with my hostname setup. I have set > > > > hostname and domainname, and I can't figure out why hostname > > > > --fqdn would return unknown host? > > > > > > > > What config file am I failing to check? /etc/sysconfig/network > > > > has the right hostname. > > > > > > > > Gary Dunn wrote: > > > > > On Thu, 2002-05-09 at 06:29, David Rankin wrote: > > > > > > Just a quick Q, because I'm suffering from a mental lapse. > > > > > > > > > > > > I'm getting Apache configured on 8.2. The "SERVER_NAME" > > > > > > variable in the default Welcome screen is pulling > > > > > > 127.0.0.1 instead of the actual host name. Hostname is > > > > > > working fine. Where do I look to get this fixed. > > > > > > > > > > You definitely need to edit httpd.conf, which may be located in > > > > > /usr/local/apache/conf depending on how your system is set up. > > > > > (My apache is on a FreeBSD box, which puts it in > > > > > /usr/local/etc/apache.) > > > > > > > > > > Look for this: > > > > > > > > > > # 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. > > > > > # If your host doesn't have a registered DNS name, enter its IP > > > > > address here. > > > > > # You will have to access it by its address (e.g., > > > > > http://123.45.67.89/) > > > > > # anyway, and this will make redirections work in a sensible > > > > > way.# > > > > > # 127.0.0.1 is the TCP/IP local loop-back address, often named > > > > > localhost. Your > > > > > # machine always knows itself by this address. If you use Apache > > > > > strictly for > > > > > # local testing and development, you may use 127.0.0.1 as the > > > > > server name. > > > > > # > > > > > ServerName your.server.name > > > > > > > > > > Gary Dunn > > > > > Open Slate Project > > > > > > > > > > - > > > > > --- Want to buy your Pack or Services from > > > > > MandrakeSoft? Go to http://www.mandrakestore.com > > > > > > > > -- > > > > David C. Rankin, J.D., P.E. > > > > RANKIN * BERTIN, PLLC > > > > 1329 N. University, Suite D4 > > > > Nacogdoches, Texas 75961 > > > > (936) 715-9333 > > > > (936) 715-9339 fax > > > > > > - > > > --- Want to buy your Pack or Services from MandrakeSoft? > > > Go to http://www.mandrakestore.com > > > > -- > > David C. Rankin, J.D., P.E. > > RANKIN * BERTIN, PLLC > > 1329 N. University, Suite D4 > > Nacogdoches, Texas 75
Re: [expert] Apache "SERVER_NAME" quick Q
That one I don't have and will have to rely on someones else to be able to duplicate. James On Fri, 10 May 2002 16:32:55 -0500 David Rankin <[EMAIL PROTECTED]> wrote: > Hmm.., but what if I have BIND running and host.resolve set to BIND, > hosts? > > James wrote: > > > Ok did a test. and got the following. > > > > If you have something like this in /etc/hosts. > > > > 10.0.0.1 my.box.com my > > > > where 10.0.0.1 is your IP number, my.box.com is the full name of the > > box, and my is the nickname. hostname and hostname --fqdn work. If > > you remove the nickname and just have > > > > 10.0.0.1 my.box.com > > > > hostname returns my.box.com and hostname --fqdn returns host unknow. > > or if you have the default that Mandrake sets up, > > > > 10.0.0.1 my > > > > then hostname works and again hostname --fqdn returns host unkown. > > > > James > > > > On Thu, 09 May 2002 15:18:23 -0500 > > David Rankin <[EMAIL PROTECTED]> wrote: > > > > > Well, I should have been more clear, and maybe the problem > > > isn't as simple as I thought. On my 7.2 box, #ServerName > > > your.server.name is still commented out, but apache is able to > > > use gethostbyname() and correctly fill in the welcome screen > > > in apache. > > > > > > In 8.2, something is fishy. > > > > > > [Skyline] # hostname > > > Skyline.3111Skyline.com > > > > > > That looks OK > > > > > > [Skyline] # hostname --fqdn > > > Unknown host > > > > > > That looks bad > > > > > > So it seems the problem with apache isn't with apache or > > > httpd.conf, but rather with my hostname setup. I have set > > > hostname and domainname, and I can't figure out why hostname > > > --fqdn would return unknown host? > > > > > > What config file am I failing to check? /etc/sysconfig/network > > > has the right hostname. > > > > > > > > > Gary Dunn wrote: > > > > > > > On Thu, 2002-05-09 at 06:29, David Rankin wrote: > > > > > Just a quick Q, because I'm suffering from a mental lapse. > > > > > > > > > > I'm getting Apache configured on 8.2. The "SERVER_NAME" > > > > > variable in the default Welcome screen is pulling > > > > > 127.0.0.1 instead of the actual host name. Hostname is > > > > > working fine. Where do I look to get this fixed. > > > > > > > > You definitely need to edit httpd.conf, which may be located in > > > > /usr/local/apache/conf depending on how your system is set up. > > > > (My apache is on a FreeBSD box, which puts it in > > > > /usr/local/etc/apache.) > > > > > > > > Look for this: > > > > > > > > # 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. > > > > # If your host doesn't have a registered DNS name, enter its IP > > > > address here. > > > > # You will have to access it by its address (e.g., > > > > http://123.45.67.89/) > > > > # anyway, and this will make redirections work in a sensible > > > > way.# > > > > # 127.0.0.1 is the TCP/IP local loop-back address, often named > > > > localhost. Your > > > > # machine always knows itself by this address. If you use Apache > > > > strictly for > > > > # local testing and development, you may use 127.0.0.1 as the > > > > server name. > > > > # > > > > ServerName your.server.name > > > > > > > > Gary Dunn > > > > Open Slate Project > > > > > > > > - > > > > --- Want to buy your Pack or Services from > > > > MandrakeSoft? Go to http://www.mandrakestore.com > > > > > > -- > > > David C. Rankin, J.D., P.E. > > > RANKIN * BERTIN, PLLC > > > 1329 N. University, Suite D4 > > > Nacogdoches, Texas 75961 > > > (936) 715-9333 > > > (936) 715-9339 fax > > > > > > > > > > > > > > > > - > > --- Want to buy your Pack or Services from MandrakeSoft? > > Go to http://www.mandrakestore.com > > -- > David C. Rankin, J.D., P.E. > RANKIN * BERTIN, PLLC > 1329 N. University, Suite D4 > Nacogdoches, Texas 75961 > (936) 715-9333 > (936) 715-9339 fax > > > > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
Ok, I'll dig into that. My 7.2 box is running right now and it 'digs' just fine. I'll crank up 8.2 when I get home and see whats up: [david@Nemesis david]$ dig 3111skyline.com ; <<>> DiG 8.2 <<>> 3111skyline.com ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUERY SECTION: ;; 3111skyline.com, type = A, class = IN ;; ANSWER SECTION: 3111skyline.com.12H IN A66.76.41.206 ;; AUTHORITY SECTION: 3111skyline.com.12H IN NS ns1.domaindiscover.com. 3111skyline.com.12H IN NS ns2.domaindiscover.com. ;; ADDITIONAL SECTION: ns1.domaindiscover.com. 1d4h36m52s IN A 216.104.161.21 ns2.domaindiscover.com. 1d4h36m52s IN A 216.104.161.22 ;; Total query time: 178 msec ;; FROM: Nemesis.rbpllc.com to SERVER: default -- 127.0.0.1 ;; WHEN: Fri May 10 14:48:45 2002 ;; MSG SIZE sent: 33 rcvd: 132 Gary Dunn wrote: > On Thu, 2002-05-09 at 10:18, David Rankin wrote: > > Well, I should have been more clear, and maybe the problem isn't as simple > > as I thought. On my 7.2 box, #ServerName your.server.name is still commented > > out, but apache is able to use gethostbyname() and correctly fill in the > > welcome screen in apache. > > > > In 8.2, something is fishy. > > > > [Skyline] # hostname > > Skyline.3111Skyline.com > > > > That looks OK > > > > [Skyline] # hostname --fqdn > > Unknown host > > > > That looks bad > > > > So it seems the problem with apache isn't with apache or httpd.conf, but > > rather with my hostname setup. I have set hostname and domainname, and I can't > > Looks like a DNS - bind - network configuration problem. "hostname" > alone takes your host's name from a file, while the fqdn option tells > hostname to do a DNS lookup. > > Does the output to dig slashdot.org look similar to this? > > ; <<>> DiG 9.2.0rc3 <<>> slashdot.org > ;; global options: printcmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48421 > ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 > > ;; QUESTION SECTION: > ;slashdot.org. IN A > > ;; ANSWER SECTION: > slashdot.org. 7930IN A 64.28.67.150 > ... > > And of course you should "dig" yourself: > > $ dig Skyline.3111Skyline.com > > ; <<>> DiG 9.2.0rc3 <<>> Skyline.3111Skyline.com > ;; global options: printcmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39873 > > I think this -- is your problem. > > ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 > > ;; QUESTION SECTION: > ;Skyline.3111Skyline.com. IN A > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com -- David C. Rankin, J.D., P.E. RANKIN * BERTIN, PLLC 1329 N. University, Suite D4 Nacogdoches, Texas 75961 (936) 715-9333 (936) 715-9339 fax Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
Hmm.., but what if I have BIND running and host.resolve set to BIND, hosts? James wrote: > Ok did a test. and got the following. > > If you have something like this in /etc/hosts. > > 10.0.0.1 my.box.com my > > where 10.0.0.1 is your IP number, my.box.com is the full name of the > box, and my is the nickname. hostname and hostname --fqdn work. If you > remove the nickname and just have > > 10.0.0.1 my.box.com > > hostname returns my.box.com and hostname --fqdn returns host unknow. or > if you have the default that Mandrake sets up, > > 10.0.0.1 my > > then hostname works and again hostname --fqdn returns host unkown. > > James > > On Thu, 09 May 2002 15:18:23 -0500 > David Rankin <[EMAIL PROTECTED]> wrote: > > > Well, I should have been more clear, and maybe the problem isn't > > as simple as I thought. On my 7.2 box, #ServerName > > your.server.name is still commented out, but apache is able to use > > gethostbyname() and correctly fill in the welcome screen in > > apache. > > > > In 8.2, something is fishy. > > > > [Skyline] # hostname > > Skyline.3111Skyline.com > > > > That looks OK > > > > [Skyline] # hostname --fqdn > > Unknown host > > > > That looks bad > > > > So it seems the problem with apache isn't with apache or > > httpd.conf, but rather with my hostname setup. I have set hostname > > and domainname, and I can't figure out why hostname --fqdn would > > return unknown host? > > > > What config file am I failing to check? /etc/sysconfig/network has > > the right hostname. > > > > > > Gary Dunn wrote: > > > > > On Thu, 2002-05-09 at 06:29, David Rankin wrote: > > > > Just a quick Q, because I'm suffering from a mental lapse. > > > > > > > > I'm getting Apache configured on 8.2. The "SERVER_NAME" > > > > variable in the default Welcome screen is pulling 127.0.0.1 > > > > instead of the actual host name. Hostname is working fine. > > > > Where do I look to get this fixed. > > > > > > You definitely need to edit httpd.conf, which may be located in > > > /usr/local/apache/conf depending on how your system is set up. (My > > > apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) > > > > > > Look for this: > > > > > > # 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. > > > # If your host doesn't have a registered DNS name, enter its IP > > > address here. > > > # You will have to access it by its address (e.g., > > > http://123.45.67.89/) > > > # anyway, and this will make redirections work in a sensible way. > > > # > > > # 127.0.0.1 is the TCP/IP local loop-back address, often named > > > localhost. Your > > > # machine always knows itself by this address. If you use Apache > > > strictly for > > > # local testing and development, you may use 127.0.0.1 as the server > > > name. > > > # > > > ServerName your.server.name > > > > > > Gary Dunn > > > Open Slate Project > > > > > > - > > > --- Want to buy your Pack or Services from MandrakeSoft? > > > Go to http://www.mandrakestore.com > > > > -- > > David C. Rankin, J.D., P.E. > > RANKIN * BERTIN, PLLC > > 1329 N. University, Suite D4 > > Nacogdoches, Texas 75961 > > (936) 715-9333 > > (936) 715-9339 fax > > > > > > > > > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com -- David C. Rankin, J.D., P.E. RANKIN * BERTIN, PLLC 1329 N. University, Suite D4 Nacogdoches, Texas 75961 (936) 715-9333 (936) 715-9339 fax Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
Ok did a test. and got the following. If you have something like this in /etc/hosts. 10.0.0.1 my.box.com my where 10.0.0.1 is your IP number, my.box.com is the full name of the box, and my is the nickname. hostname and hostname --fqdn work. If you remove the nickname and just have 10.0.0.1 my.box.com hostname returns my.box.com and hostname --fqdn returns host unknow. or if you have the default that Mandrake sets up, 10.0.0.1 my then hostname works and again hostname --fqdn returns host unkown. James On Thu, 09 May 2002 15:18:23 -0500 David Rankin <[EMAIL PROTECTED]> wrote: > Well, I should have been more clear, and maybe the problem isn't > as simple as I thought. On my 7.2 box, #ServerName > your.server.name is still commented out, but apache is able to use > gethostbyname() and correctly fill in the welcome screen in > apache. > > In 8.2, something is fishy. > > [Skyline] # hostname > Skyline.3111Skyline.com > > That looks OK > > [Skyline] # hostname --fqdn > Unknown host > > That looks bad > > So it seems the problem with apache isn't with apache or > httpd.conf, but rather with my hostname setup. I have set hostname > and domainname, and I can't figure out why hostname --fqdn would > return unknown host? > > What config file am I failing to check? /etc/sysconfig/network has > the right hostname. > > > Gary Dunn wrote: > > > On Thu, 2002-05-09 at 06:29, David Rankin wrote: > > > Just a quick Q, because I'm suffering from a mental lapse. > > > > > > I'm getting Apache configured on 8.2. The "SERVER_NAME" > > > variable in the default Welcome screen is pulling 127.0.0.1 > > > instead of the actual host name. Hostname is working fine. > > > Where do I look to get this fixed. > > > > You definitely need to edit httpd.conf, which may be located in > > /usr/local/apache/conf depending on how your system is set up. (My > > apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) > > > > Look for this: > > > > # 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. > > # If your host doesn't have a registered DNS name, enter its IP > > address here. > > # You will have to access it by its address (e.g., > > http://123.45.67.89/) > > # anyway, and this will make redirections work in a sensible way. > > # > > # 127.0.0.1 is the TCP/IP local loop-back address, often named > > localhost. Your > > # machine always knows itself by this address. If you use Apache > > strictly for > > # local testing and development, you may use 127.0.0.1 as the server > > name. > > # > > ServerName your.server.name > > > > Gary Dunn > > Open Slate Project > > > > - > > --- Want to buy your Pack or Services from MandrakeSoft? > > Go to http://www.mandrakestore.com > > -- > David C. Rankin, J.D., P.E. > RANKIN * BERTIN, PLLC > 1329 N. University, Suite D4 > Nacogdoches, Texas 75961 > (936) 715-9333 > (936) 715-9339 fax > > > > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
try a man hosts it's the local static table lookup for host names.. /bo On Friday 10 May 2002 00:26, Ric Tibbetts wrote: > Then I screwed my eyes back in, and re-read the question. > You're right, you have aDNS problem. > What's in /etc/hosts ? > > Ric Tibbetts wrote: > > On mine, I have a server with multiple hostnames. So Apache was getting > > soem strange results. I set mine in /etc/httpd/httpd.conf (on LM 8.1). > > The setting is near the top, and is commented out by default. I > > uncomment it, and put the hostname I want in the ServerName entry. Like > > so: > > > > ServerName www..net > > > > Then it picks up that entry, and not the name assigned to the NIC. > > > > Dunno if that helps you or not. But it solved my problem. > > > > David Rankin wrote: > >> Well, I should have been more clear, and maybe the problem isn't > >> as simple > >> as I thought. On my 7.2 box, #ServerName your.server.name is still > >> commented > >> out, but apache is able to use gethostbyname() and correctly fill in the > >> welcome screen in apache. > >> > >> In 8.2, something is fishy. > >> > >> [Skyline] # hostname > >> Skyline.3111Skyline.com > >> > >> That looks OK > >> > >> [Skyline] # hostname --fqdn > >> Unknown host > >> > >> That looks bad > >> > >> So it seems the problem with apache isn't with apache or > >> httpd.conf, but > >> rather with my hostname setup. I have set hostname and domainname, and > >> I can't > >> figure out why hostname --fqdn would return unknown host? > >> > >> What config file am I failing to check? /etc/sysconfig/network has > >> the > >> right hostname. > >> > >> Gary Dunn wrote: > >>> On Thu, 2002-05-09 at 06:29, David Rankin wrote: > Just a quick Q, because I'm suffering from a mental lapse. > > I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in > the default Welcome screen is pulling 127.0.0.1 instead of the actual > host name. Hostname is working fine. Where do I look to get this > fixed. > >>> > >>> You definitely need to edit httpd.conf, which may be located in > >>> /usr/local/apache/conf depending on how your system is set up. (My > >>> apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) > >>> > >>> Look for this: > >>> > >>> # 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. > >>> # If your host doesn't have a registered DNS name, enter its IP address > >>> here. > >>> # You will have to access it by its address (e.g., > >>> http://123.45.67.89/) # anyway, and this will make redirections work in > >>> a sensible way. # > >>> # 127.0.0.1 is the TCP/IP local loop-back address, often named > >>> localhost. Your > >>> # machine always knows itself by this address. If you use Apache > >>> strictly for > >>> # local testing and development, you may use 127.0.0.1 as the server > >>> name. > >>> # > >>> ServerName your.server.name > >>> > >>> Gary Dunn > >>> Open Slate Project > >>> > >>> > >>> --- > >>>- > >>> > >>> Want to buy your Pack or Services from MandrakeSoft? > >>> Go to http://www.mandrakestore.com > >> > >> -- > >> David C. Rankin, J.D., P.E. > >> RANKIN * BERTIN, PLLC > >> 1329 N. University, Suite D4 > >> Nacogdoches, Texas 75961 > >> (936) 715-9333 > >> (936) 715-9339 fax > >> > >> > >> > >> > >> > >> > >> > >> Want to buy your Pack or Services from MandrakeSoft? Go to > >> http://www.mandrakestore.com > > > > > > > > Want to buy your Pack or Services from MandrakeSoft? > > Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
Then I screwed my eyes back in, and re-read the question. You're right, you have aDNS problem. What's in /etc/hosts ? Ric Tibbetts wrote: > On mine, I have a server with multiple hostnames. So Apache was getting > soem strange results. I set mine in /etc/httpd/httpd.conf (on LM 8.1). > The setting is near the top, and is commented out by default. I > uncomment it, and put the hostname I want in the ServerName entry. Like so: > > ServerName www..net > > Then it picks up that entry, and not the name assigned to the NIC. > > Dunno if that helps you or not. But it solved my problem. > > > > David Rankin wrote: > >> Well, I should have been more clear, and maybe the problem isn't >> as simple >> as I thought. On my 7.2 box, #ServerName your.server.name is still >> commented >> out, but apache is able to use gethostbyname() and correctly fill in the >> welcome screen in apache. >> >> In 8.2, something is fishy. >> >> [Skyline] # hostname >> Skyline.3111Skyline.com >> >> That looks OK >> >> [Skyline] # hostname --fqdn >> Unknown host >> >> That looks bad >> >> So it seems the problem with apache isn't with apache or >> httpd.conf, but >> rather with my hostname setup. I have set hostname and domainname, and >> I can't >> figure out why hostname --fqdn would return unknown host? >> >> What config file am I failing to check? /etc/sysconfig/network has >> the >> right hostname. >> >> >> Gary Dunn wrote: >> >> >>> On Thu, 2002-05-09 at 06:29, David Rankin wrote: >>> Just a quick Q, because I'm suffering from a mental lapse. I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in the default Welcome screen is pulling 127.0.0.1 instead of the actual host name. Hostname is working fine. Where do I look to get this fixed. >>> >>> >>> You definitely need to edit httpd.conf, which may be located in >>> /usr/local/apache/conf depending on how your system is set up. (My >>> apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) >>> >>> Look for this: >>> >>> # 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. >>> # If your host doesn't have a registered DNS name, enter its IP address >>> here. >>> # You will have to access it by its address (e.g., http://123.45.67.89/) >>> # anyway, and this will make redirections work in a sensible way. >>> # >>> # 127.0.0.1 is the TCP/IP local loop-back address, often named >>> localhost. Your >>> # machine always knows itself by this address. If you use Apache >>> strictly for >>> # local testing and development, you may use 127.0.0.1 as the server >>> name. >>> # >>> ServerName your.server.name >>> >>> Gary Dunn >>> Open Slate Project >>> >>> >>> >>> Want to buy your Pack or Services from MandrakeSoft? >>> Go to http://www.mandrakestore.com >> >> >> >> -- >> David C. Rankin, J.D., P.E. >> RANKIN * BERTIN, PLLC >> 1329 N. University, Suite D4 >> Nacogdoches, Texas 75961 >> (936) 715-9333 >> (936) 715-9339 fax >> >> >> >> >> >> >> >> Want to buy your Pack or Services from MandrakeSoft? Go to >> http://www.mandrakestore.com > > > > > > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com -- Ric Tibbetts Linux registration number: 55684 If you want to help advertise Linux - point your friends to http://counter.li.org/ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
On mine, I have a server with multiple hostnames. So Apache was getting soem strange results. I set mine in /etc/httpd/httpd.conf (on LM 8.1). The setting is near the top, and is commented out by default. I uncomment it, and put the hostname I want in the ServerName entry. Like so: ServerName www..net Then it picks up that entry, and not the name assigned to the NIC. Dunno if that helps you or not. But it solved my problem. David Rankin wrote: > Well, I should have been more clear, and maybe the problem isn't as simple > as I thought. On my 7.2 box, #ServerName your.server.name is still commented > out, but apache is able to use gethostbyname() and correctly fill in the > welcome screen in apache. > > In 8.2, something is fishy. > > [Skyline] # hostname > Skyline.3111Skyline.com > > That looks OK > > [Skyline] # hostname --fqdn > Unknown host > > That looks bad > > So it seems the problem with apache isn't with apache or httpd.conf, but > rather with my hostname setup. I have set hostname and domainname, and I can't > figure out why hostname --fqdn would return unknown host? > > What config file am I failing to check? /etc/sysconfig/network has the > right hostname. > > > Gary Dunn wrote: > > >>On Thu, 2002-05-09 at 06:29, David Rankin wrote: >> >>>Just a quick Q, because I'm suffering from a mental lapse. >>> >>>I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in >>>the default Welcome screen is pulling 127.0.0.1 instead of the actual >>>host name. Hostname is working fine. Where do I look to get this fixed. >> >>You definitely need to edit httpd.conf, which may be located in >>/usr/local/apache/conf depending on how your system is set up. (My >>apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) >> >>Look for this: >> >># 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. >># If your host doesn't have a registered DNS name, enter its IP address >>here. >># You will have to access it by its address (e.g., http://123.45.67.89/) >># anyway, and this will make redirections work in a sensible way. >># >># 127.0.0.1 is the TCP/IP local loop-back address, often named >>localhost. Your >># machine always knows itself by this address. If you use Apache >>strictly for >># local testing and development, you may use 127.0.0.1 as the server >>name. >># >>ServerName your.server.name >> >>Gary Dunn >>Open Slate Project >> >> >>Want to buy your Pack or Services from MandrakeSoft? >>Go to http://www.mandrakestore.com > > > -- > David C. Rankin, J.D., P.E. > RANKIN * BERTIN, PLLC > 1329 N. University, Suite D4 > Nacogdoches, Texas 75961 > (936) 715-9333 > (936) 715-9339 fax > > > > > > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com -- Ric Tibbetts Linux registration number: 55684 If you want to help advertise Linux - point your friends to http://counter.li.org/ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
On Thu, 2002-05-09 at 10:18, David Rankin wrote: > Well, I should have been more clear, and maybe the problem isn't as simple > as I thought. On my 7.2 box, #ServerName your.server.name is still commented > out, but apache is able to use gethostbyname() and correctly fill in the > welcome screen in apache. > > In 8.2, something is fishy. > > [Skyline] # hostname > Skyline.3111Skyline.com > > That looks OK > > [Skyline] # hostname --fqdn > Unknown host > > That looks bad > > So it seems the problem with apache isn't with apache or httpd.conf, but > rather with my hostname setup. I have set hostname and domainname, and I can't Looks like a DNS - bind - network configuration problem. "hostname" alone takes your host's name from a file, while the fqdn option tells hostname to do a DNS lookup. Does the output to dig slashdot.org look similar to this? ; <<>> DiG 9.2.0rc3 <<>> slashdot.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48421 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;slashdot.org. IN A ;; ANSWER SECTION: slashdot.org. 7930IN A 64.28.67.150 ... And of course you should "dig" yourself: $ dig Skyline.3111Skyline.com ; <<>> DiG 9.2.0rc3 <<>> Skyline.3111Skyline.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39873 I think this -- is your problem. ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;Skyline.3111Skyline.com. IN A Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
Well, I should have been more clear, and maybe the problem isn't as simple as I thought. On my 7.2 box, #ServerName your.server.name is still commented out, but apache is able to use gethostbyname() and correctly fill in the welcome screen in apache. In 8.2, something is fishy. [Skyline] # hostname Skyline.3111Skyline.com That looks OK [Skyline] # hostname --fqdn Unknown host That looks bad So it seems the problem with apache isn't with apache or httpd.conf, but rather with my hostname setup. I have set hostname and domainname, and I can't figure out why hostname --fqdn would return unknown host? What config file am I failing to check? /etc/sysconfig/network has the right hostname. Gary Dunn wrote: > On Thu, 2002-05-09 at 06:29, David Rankin wrote: > > Just a quick Q, because I'm suffering from a mental lapse. > > > > I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in > > the default Welcome screen is pulling 127.0.0.1 instead of the actual > > host name. Hostname is working fine. Where do I look to get this fixed. > > You definitely need to edit httpd.conf, which may be located in > /usr/local/apache/conf depending on how your system is set up. (My > apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) > > Look for this: > > # 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. > # If your host doesn't have a registered DNS name, enter its IP address > here. > # You will have to access it by its address (e.g., http://123.45.67.89/) > # anyway, and this will make redirections work in a sensible way. > # > # 127.0.0.1 is the TCP/IP local loop-back address, often named > localhost. Your > # machine always knows itself by this address. If you use Apache > strictly for > # local testing and development, you may use 127.0.0.1 as the server > name. > # > ServerName your.server.name > > Gary Dunn > Open Slate Project > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com -- David C. Rankin, J.D., P.E. RANKIN * BERTIN, PLLC 1329 N. University, Suite D4 Nacogdoches, Texas 75961 (936) 715-9333 (936) 715-9339 fax Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
On Thu, 2002-05-09 at 06:29, David Rankin wrote: > Just a quick Q, because I'm suffering from a mental lapse. > > I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in > the default Welcome screen is pulling 127.0.0.1 instead of the actual > host name. Hostname is working fine. Where do I look to get this fixed. You definitely need to edit httpd.conf, which may be located in /usr/local/apache/conf depending on how your system is set up. (My apache is on a FreeBSD box, which puts it in /usr/local/etc/apache.) Look for this: # 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. # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address (e.g., http://123.45.67.89/) # anyway, and this will make redirections work in a sensible way. # # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your # machine always knows itself by this address. If you use Apache strictly for # local testing and development, you may use 127.0.0.1 as the server name. # ServerName your.server.name Gary Dunn Open Slate Project Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
In httpd.conf off course. David Rankin wrote: >Just a quick Q, because I'm suffering from a mental lapse. > >I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in >the default Welcome screen is pulling 127.0.0.1 instead of the actual >host name. Hostname is working fine. Where do I look to get this fixed. > >-- >David C. Rankin, J.D., P.E. >RANKIN * BERTIN, PLLC >1329 N. University, Suite D4 >Nacogdoches, Texas 75961 >(936) 715-9333 >(936) 715-9339 fax > > > > > > > >Want to buy your Pack or Services from MandrakeSoft? >Go to http://www.mandrakestore.com > > Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [expert] Apache "SERVER_NAME" quick Q
I'd try looking in the /etc/hosts file On Thursday 09 May 2002 18:29, David Rankin wrote: > Just a quick Q, because I'm suffering from a mental lapse. > > I'm getting Apache configured on 8.2. The "SERVER_NAME" variable in > the default Welcome screen is pulling 127.0.0.1 instead of the actual > host name. Hostname is working fine. Where do I look to get this fixed. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com