Hi,
This post details the steps I went through to get apache working on my Mandrake 9.1 box. There's a few queries along the way but it's mainly to help other people.
Installed Mandy 9.1 (didn't choose apache as part of the install)
Downloaded the apache source
compiled the source using:
$ ./configure --prefix=/usr/local/apache2
$ make
$ make install
$ /usr/local/apache2/bin/apachectl start
The final line gave the error:
"httpd: Could not determine the server's fully qualified domain name, using..."
so I edited /usr/local/apache2/conf/httpd.conf, finding the line:
#ServerName
www.example.com:80
and uncommented it, changing it to:
ServerName xx.xxx.xx.xxx:80 (IP munged for security)
This is the static IP of my router, witch is set to forward external TCP (not UDP) requests on port 80 to the static local network IP of my linux machine.
I hope I did this correctly - I'm not 100% sure!
Then, running
apachectl start
gave the error:
[error] (13)Permission denied: could not open transfer log file /usr/local/apache2/logs/access_log.
Unable to open logs
I then su'd into root, and ran:
./apachectl start
from within /usr/local/apache2/bin
No errors, and
ps ax | grep apac
shows:
16824 ? S 0:00 /usr/local/apache2/bin/httpd -k start
So it seems to be running,
but is it safe to run apache as root?
If I then go to my web browser, and type
http://xx.xxx.xx.xxx (IP munged for security)
into the address bar it thinks for a while and returns:
An error occured while loading
http://xx.xxx.xx.xxx: (IP munged for security)
Timeout on server
Connection was to xx.xxx.xx.xxx at port 80 (IP munged for security)
So I am unsure what to do next... then Brainwave! I went into Mandrake Control Centre and added 80/TCP under the advanced settings of my firewall. Success! Going to
http://xx.xxx.xx.xxx (IP munged for security) now brings up the Apache test page. I am so happy, I am so happy!
Now I'd like to have apache run automatically when I boot my computer. I got an email app called "korn" to load automatically on boot by adding a link (right-click, create new, link to application) to it in:
file:/home/toby/.kde/Autostart
I can't do the same for apache since it needs root privelages.
Any advice?