Results 1 to 10 of 10
I had to restart my linux server today and now it doesn't want to deliver web pages. I keep getting an error that I cannot connect to the server.
This ...
- 04-05-2003 #1Just Joined!
- Join Date
- Mar 2003
- Posts
- 17
Apache not delivering web pages.
I had to restart my linux server today and now it doesn't want to deliver web pages. I keep getting an error that I cannot connect to the server.
This is puzzling because I have had to restart this server before when I have had to move it for one reason or another. I can ping and telnet into the machine. I can use lynx to browse from this machine to other sites. It will not browse to itself.
This is the version number of apache:
Server version: Apache/1.3.14 (Unix) (SuSE/Linux)
Server built: Jan 19 2001 14:00:47
I am running suse linux on this computer and the version number is 8.
I thought I knew how to manually start the apache server but cannot find the command. I am at home and do not have my notes with me. Again I am somewhat new to linux.
Can anyone tell me how to get this started again
- 04-05-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Try "service httpd start".
- 04-05-2003 #3Just Joined!
- Join Date
- Mar 2003
- Posts
- 17
I tried the command and received a message that the command service was not found.
- 04-05-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Are you logged in as a normal user or as root? If you logged in as a user and switched to root, did you do "su" or "su -"?
Try "/sbin/service httpd start" instead.
- 04-05-2003 #5Just Joined!
- Join Date
- Mar 2003
- Posts
- 17
Tried both login types and still could not get it to work. Received this message:
/sbin/service httpd start: No such file or directory
- 04-05-2003 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
It is apparent that I don't know how SuSE's init scheme works. I would have though that it would be SysV compatible. Maybe it's just the service command that's missing? Try "/etc/init.d/httpd start" instead.
Otherwise, try just "httpd".
- 04-05-2003 #7Just Joined!
- Join Date
- Mar 2003
- Posts
- 17
tried this:
suse:~ # /etc/init.d/httpd start
bash: /etc/init.d/httpd: No such file or directory
and also this
suse:/etc/httpd # httpd
httpd: bad user name apache
Still will not restart
- 04-05-2003 #8Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
suse seems to have configure this pretty strangely. Check in /etc/passwd if you have an httpd user instead of an apache user, and if you have, change its name to apache (using any text editor that you happen to like), and try starting httpd again. If you don't have one, add this line to /etc/passwd:
And this line to /etc/group:Code:apache:x:48:48::/var/www:/sbin/nologin
NOTE! The number 48 is a standard one for apache that is _usually_ free. Check the other entries so that it isn't taken, and if it is, replace it with any other. It doesn't matter which number it gets, but it should be below 100.Code:apache:x:48:
- 04-05-2003 #9Just Joined!
- Join Date
- Mar 2003
- Posts
- 17
I added the lines of code and also remembered that I had change two lines in httpd.conf a while back.
I put the old file back and so now I am not sure which did the trick. The serve is now working again.
The lines that I changed in httpd.conf were:
User wwwrun
Group nogroup
and I changed them to:
User apache
Group nogroup
The reason I did this was because the site that was hosted on this page was having trouble with persmissions. If they added a completely new page or graphic then the permissions were not correct. I check a red hat box that I use a little and it hd the settings like the bottom set.
It will be interesting to see if I had new pages if they will get delivered without changing the permissions.
I do appreciate all the help.
- 08-15-2005 #10Just Joined!
- Join Date
- Aug 2005
- Posts
- 1
Use the following to start:
/etc/init.d/apache2 start
The following to view status:
/etc/init.d/apache2 status
And the following to restart:
/etc/init.d/apache2 restart


Reply With Quote
