Freebsd 6.1/Apache question

millhouse

Limp Gawd
Joined
Jul 19, 2004
Messages
173
So I am trying to get apache to start on boot and it is just plain not working.

added the following to /etc/rc.conf

apache_enable="YES"
apache2_enable="YES"

The last line was for good measure I guess. Anyways, I init 6 the server and apache is still not starting on boot. I keep having to use "/usr/local/sbin/apachectl start" to get it to run.


Any ideas? I'm out of em...


Thanks!
 
Does /usr/local/etc/rc.d/apache2.sh start work?

(Btw, "init 6" ? )
 
HHunt said:
Does /usr/local/etc/rc.d/apache2.sh start work?

(Btw, "init 6" ? )


init 6 --> Reboots the machine.


Something wrong with that?

Also, the above command doesnt work
 
Ah, right. I'd use "reboot" instead, but nothing wrong with it.
(I though you meant "server" as in "httpd", which made it a bit harder to parse.)

What apache-related scripts have you got in /usr/local/etc/rc.d/ ?
 
Which version of apache are you using? Did you look at the apache start-up script in /usr/local/etc/rc.d to find out which options you need to set in /etc/rc.conf?

I'm running apache2 on some machines and apache22 on others, and the variables in /etc/rc.conf change depending on which version of apache I'm using.

init 6? Grr. I hate SysV-isms in FreeBSD. FreeBSD does not have runlevels in that sense. I'd use shutdown -r now...
 
OK Here are some specifics. This is Freebsd 6.1, Apache 2.2.2 with nothing special configured, just a default make install clean from ports. I have done this in the past with no troubles so I dont see why this shouldnt work. I haven't configured any other variables in rc.conf (Just apache_enable="YES"). Perhaps that is the problem?

:p I know I should use shutdown -r now but init 6 is just quicker to type!
 
Doh!!! :eek: :eek: :eek:

Checking the script in /usr/local/etc/rc.d I should be using apache22_enable to start on boot. Thanks for the reminder! You guys, as always, rock! :D
 
millhouse said:
:p I know I should use shutdown -r now but init 6 is just quicker to type!

Use "reboot", then. ;)
Besides, you could the extra moments it takes to type to consider once more if you really want to do it, and if you're logged into the right computer. Especially the latter.

Btw, I really do like the wording of the relevant man pages:
man reboot said:
Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs.
(It's also interesting to note that this manpage was last updated June 9, 1993. Some programs seem to have stabilized.)

man shutdown said:
The shutdown utility provides an automated shutdown procedure for superusers to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties.
...
At intervals, becoming more frequent as apocalypse approaches and starting at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in.
 
Back
Top