LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Test page isn't working (https://www.linuxquestions.org/questions/linux-newbie-8/apache-test-page-isnt-working-680909/)

cozcol 11-03-2008 04:45 PM

Apache Test page isn't working
 
Hi,

first post for me,

when I open a browser I do not get the Apache 2 Test Page
powered by CentOS. I have taken a look through my httpd.conf file but cannot work out how i get this working.

I installed Contos 5.2 and included apache, so I can start the httpd service OK.

jay73 11-03-2008 05:42 PM

Are you sure that apache is running at all? Did you use localhost:80 as the address?

cozcol 11-03-2008 06:05 PM

No apache test page :(
 
thankyou for the fast reply

yes my apache starts up OK and I have reloaded it/restarted it many times after editing the httpd.conf file.

from what i can see I have added port 80 for my servers Ip address. pls see below


# redirections work in a sensible way.
#
ServerName xx.xx.xx:80 <-- -IP HIDDEN

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off


I have the following for servername and Serveradmin

ServerAdmin root@hostname.domainname.co.nz <-- DETAILS HIDDEN

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName 172.xx.xx.xx:80 <-- -IP HIDDEN

jay73 11-03-2008 06:39 PM

Hmm, so are you trying to access from the server or from a client? If the latter, you may have port 80 closed.

cozcol 11-03-2008 07:14 PM

well i have made some more changes to the httpd.conf file but still no joy.

I've changed it to listen on local port 80 -

Listen 127.0.0.1:80
#
# Dynamic Shared Object (DSO) Support

and changed the Serername to localhost

# redirections work in a sensible way.
#
ServerName localhost:80


when i run a netstat -na

# netstat -na | grep 80
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN
udp 0 0 fe80::20d:60ff:fe9a:123 :::*
udp 0 0 fe80::20d:60ff:fe9a:123 :::*
unix 2 [ ] DGRAM 1680 @/org/kernel/udev/udevd
[root@wklmon02 conf]#


this doesn't look as good as one of my other servers, this has lots of port 80's in TIME_WAIT

netstat -na | grep 80
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63948 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63949 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63950 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63951 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63952 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63980 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63981 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63982 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63978 TIME_WAIT
tcp 0 0 ::ffff:172.x0.xx.6:80 ::ffff:202.xx.x9.46:63979 TIME_WAIT
unix 3 [ ] STREAM CONNECTED 5880 @/var/run/hald/dbus-jvBMjSjvrA
unix 2 [ ] DGRAM 5801
unix 2 [ ] DGRAM 4809
[root@metmanl1 logs]#

i only want to open a firefox browser,put the IP of my server in and hey presto - apache 2 config page for centos will appear

it does it on anotherserver when i start httpd service, and i dont need it running on that one :((

cozcol 11-03-2008 09:22 PM

ok I have it working now, thanks for the reply, IPtables was only allowing port 22.

so i will crack on with configuring bigsister - which is a daunting task :(


All times are GMT -5. The time now is 08:03 PM.