You already receive several useful replies, so let me just add the
commands which should give some useful facts for us so that we do not
need to rely on a story but on computer facts.
To ensure apache is running show us the output from
martinh@ganymed:~> su -
Passwort:
ganymed:~ # rcapache2 status
redirecting to systemctl
apache2.service - apache
Loaded: loaded (/lib/systemd/system/apache2.service; disabled)
Active: inactive (dead)
CGroup: name=systemd:/system/apache2.service
as you see it is NOT running on my machine, in that case start it
ganymed:~ # rcapache2 start
redirecting to systemctl
ganymed:~ # rcapache2 status
redirecting to systemctl
apache2.service - apache
Loaded: loaded (/lib/systemd/system/apache2.service; disabled)
Active: active (running) since Wed, 03 Oct 2012 13:46:09
+0200; 4s ago
Process: 8682 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k
start (code=exited, status=0/SUCCESS)
Main PID: 8703 (httpd2-prefork)
CGroup: name=systemd:/system/apache2.service
<snip>
which shows it now running. What I want to say is, these are facts and
not a story.
Next thing
martinh@ganymed:~> rpm -qf /srv/www/htdocs/index.html
apache2-example-pages-2.2.22-4.7.1.x86_64
so that means the index.html (the famous “It works”) is only there if
you have the package apache2-example-pages installed.
Confirm this with
rpm -q apache2-example-pages #package installed?
ls -l /srv/www/htdocs/ #is there an index.html?
cat /srv/www/htdocs/index.html #what does it contain?
If it turns out that apache really runs and the example pages rpm is
installed and an index.html is in /srv/www/htdocs and you still do not
see the page: You might have a misconfiguration in apache itself.
Check on the local machine with telnet if port 80 is available
martinh@ganymed:~> telnet localhost 80
Trying ::1...
Connected to localhost.
Escape character is '^]'.
GET /index.html
<html><body><h1>It works!</h1></body></html>Connection closed by foreign
host.
martinh@ganymed:~>
(after the telnet command succeeded type the “GET /index.html” and press
enter, the rest is the html apache sends you back) or try to access it
with a text based web browser like lynx.
If that succeeds and access from outside not you have a firewall, dns or
similar issue.
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.1 | HD 3000
eCAFE 800: oS 12.2 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10