LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   apache startup (https://www.linuxquestions.org/questions/%2Absd-17/apache-startup-150405/)

dmedici 02-25-2004 01:09 PM

apache startup
 
Hi folks!

First, apologies if this is in the wrong area. Also, reading previous posts didn't seem to answer my question, so here goes...

Attempting to run Apache 2.0.47 running on FreeBSD 4.9.

Using apachectl, which is located in my /usr/local/sbin directory, (httpd is also located there), I can get the version, do a configtest, blah blah, but as soon as I attempt to do a Apachectl start, I get

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I receive the above message when using the httpd command as well.

I am able to ping to the internet, having successfully tested Yahoo.com and I can even ping 127.0.0.1 , both of these from my Konsole. However, my Konqueror browser will not ping either of the above, which some instructions told me to try to see if Apache was running.

I also noticed that whenever I go to /stand/sysinstall and enter post-configuration mode and then set DHCP to on, it turns off as soon as I exit the install. Not sure if this is the problem.

What I've tried to do here is give the reader as much info as possible. Again, apologies if there is overkill, but I'm just not sure what's going on.

My question is, how do I actually get Apache to start running? Please respond as if to a noobie, which I am!

Many thanks in advance!

dmedici 02-25-2004 09:17 PM

OK, I got it!

My total Apache installation/startup was quite simple.

As mentioned above, this is on FreeBSD 4.9.

I installed Apache 2.0.47 from the command line with just two commands:

cd /usr/ports/apache2
make install && clean

The first line goes and picks up Apache2 from the port.
The second line installs it into my system.

Once there, I went into Konsole (I'm using KDE for my desktop)
and ran

# /usr/local/sbin/apachectl start

Which at first, sent me back a message as mentioned above:

"httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"

So, from Konqueror (Again, using KDE), I browsed to /etc/hosts and in this file, I replaced the example with the fully qualified domain name and IP address of the box running Apache. This had to be done as I was not running a nameserver.

My intent in this post was to make this as simple for someone else as it was made for me. Good luck!

rehab junkie 02-29-2004 04:38 AM

Thank you, you just reminded me that I needed to update /etc/hosts.

dmedici 02-29-2004 09:30 PM

Glad you could use the tip!

NOTE - Not sure if some systems are different, but where I mentioned above

cd /usr/ports/apache2

some may want to change that to:

cd /usr/ports/www/apache2

Thanks!

sporkit 03-23-2004 11:59 AM

you need to adjust /etc/hosts and /etc/sysconfig/network to something unique. if you dont youll probably run into errors because the systemname localhost exists all over your network.

my /etc/hosts
Code:

#do not remove the following line, or various progams
#that require network functionality will fail.
192.168.1.X linuxserver.localdomain localhost

my /etc/sysconfig/network
Code:

NETWORKING=yes
HOSTNAME=linuxserver.localdomain


mrcheeks 03-23-2004 12:18 PM

edit httpd.conf
add this line
ServerName localhost


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