Why won't my linux webserver start?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
I'm trying to get my linux box to run torrentflux. Torrentflux uses a web interface so I need a web server set up in Clark Connect to run its php configuration file.

Main webserver config screen in ClarkConnect
http://fuzzybabybunny.smugmug....photos/207438592-O.jpg (no matter how many times I click on "start" under the server status window the status remains "stopped.") It says the server host name must be a valid DNS name or else the server will not start. What is a valid DNS name? Do I have to go out and purchase a domain or something? Or do I edit my hosts file?
http://fuzzybabybunny.smugmug....photos/207438622-O.jpg
http://fuzzybabybunny.smugmug....photos/207438638-O.jpg

My hosts file:
http://fuzzybabybunny.smugmug....photos/207438583-O.jpg

resolv.conf: I have no idea what to do here. I added "nameserver 127.0.0.1" because a search of the CC forums told me to "put 127.0.0.1" into my resolv.conf file.
http://fuzzybabybunny.smugmug....photos/207438654-O.jpg

Apache is definitely installed but dhttp isn't running.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
There is a misconfiguration going on somewere. My guess is that torrentflux has a php module that is missing or that one of it's or apache's configuration files needs to be modified slightly to make it work. I remember installing torrentflux a while ago and having a problem with some sort of php configuration. I don't remember exactly, but it was with Debian with a completely different set of software versions. This is the sort of thing that happens sometimes.

But it's impossible to tell. You'll have to get to the command line or otherwise be able to view the server logs and find the error that is causing apache or torrentflux stuff not to start. I never used clarkconnect before, but I assume there is someplace somewere that allows you to see the various different configuration files. Otherwise you'll have to get a shell (unix command line) and find the logs files in /var/log and see what error is cropping up.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Which log file do I want to view in /var/log?

I first need to get a webserver started before I can even think about installing torrentflux. I need to get it up and running and hosting files, any files.
 

skyking

Lifer
Nov 21, 2001
22,704
5,824
146
I'm out the door, but two quick things:
1:edit httpd.config yourself. it is still a default most likely, and apache will not start. Look for a pared down version of the .conf on the web. The default is about 1100 lines large, with all sorts of spurious ( for you) configurations.
2: ditch the ssl for now. keep it simple till you get apache to talk to you.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Originally posted by: skyking
I'm out the door, but two quick things:
1:edit httpd.config yourself. it is still a default most likely, and apache will not start. Look for a pared down version of the .conf on the web. The default is about 1100 lines large, with all sorts of spurious ( for you) configurations.
2: ditch the ssl for now. keep it simple till you get apache to talk to you.

I went into the Clark Connect web config and disabled SSL.

Well, I got a sample httpd.conf file here:

http://www.faqs.org/docs/securing/chap29sec245.html

1. I made a backup of the old httpd.conf file:

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/backup_httpd.conf

Comparing the httpd.conf on CC to the one online, the one on CC had a lot MORE things than the one online.

2. I deleted the old httpd.conf file

rm /etc/httpd/conf/httpd.conf

3. I opened up a new blank httpd.conf file

vi /etc/httpd/conf/httpd.conf

4. I copied and pasted the sample httpd.conf file into notepad, then copied and pasted the stuff in notepad into vi.

5. Exited vi with :wq

"httpd.conf" [New] 153L, 4097C written

6. restarted httpd

[root@gateway conf]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd:
Apache 1.3 configuration directives found
please read /usr/share/doc/httpd-2.0.52/migration.html
[FAILED]

I take it FAILED is a bad thing.

Why is there a second, blank, httpd.conf in /etc ?
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Well, I got Apache to finally start. I decided to nuke Apache and start from scratch.

apt-get --purge remove httpd - noted that it uninstalled about 13MB of stuff

apt-get install httpd - noted that it only installed 2MB of stuff... crap

Went into my CC web config screen and downloaded all the modules for it. This seemed to work.

3.

[root@gateway etc]# ps -e|grep httpd

[root@gateway etc]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
[root@gateway etc]# ps -e|grep httpd
13867 ? 00:00:00 httpd
13870 ? 00:00:00 httpd
13871 ? 00:00:00 httpd
13872 ? 00:00:00 httpd
13873 ? 00:00:00 httpd
13874 ? 00:00:00 httpd

woohoo!

Now to see if it can actually serve files. I fully expect this to end badly, as is my luck with Linux.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: fuzzybabybunny
Well, I got Apache to finally start. I decided to nuke Apache and start from scratch.

apt-get --purge remove httpd - noted that it uninstalled about 13MB of stuff

apt-get install httpd - noted that it only installed 2MB of stuff... crap

Went into my CC web config screen and downloaded all the modules for it. This seemed to work.

3.

[root@gateway etc]# ps -e|grep httpd

[root@gateway etc]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
[root@gateway etc]# ps -e|grep httpd
13867 ? 00:00:00 httpd
13870 ? 00:00:00 httpd
13871 ? 00:00:00 httpd
13872 ? 00:00:00 httpd
13873 ? 00:00:00 httpd
13874 ? 00:00:00 httpd

woohoo!

Now to see if it can actually serve files. I fully expect this to end badly, as is my luck with Linux.
When you reinstalled, did it give you apache 1.3? I thought 2.x ran all multi-threaded in a single process...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
When you reinstalled, did it give you apache 1.3? I thought 2.x ran all multi-threaded in a single process...

Apache 2.x has a bunch of MPMs and one of them is prefork like Apache 1.x did. Although I believe Linux threads all show up as separate processes anyway.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
When you reinstalled, did it give you apache 1.3? I thought 2.x ran all multi-threaded in a single process...

Apache 2.x has a bunch of MPMs and one of them is prefork like Apache 1.x did.
Ah. My ignorance is due to never having really run a 2.x server.
Although I believe Linux threads all show up as separate processes anyway.
ps(1) says you have to use the -L switch to see threads.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I was thinking of the deprecated LinuxThreads implementation where each thread does indeed have a unique PID but NPTL which is the preferred method now does have each thread share the same PID.