PDA

View Full Version : [Solved] Apache22 will not auto start


dpalme
November 23rd, 2008, 23:57
I have added the apache22_enable="YES" to the /etc/rc.conf file and the apache22 is in /usr/local/etc/

I am not sure what else I need to do in order to get it to auto start.

Suggestions?

ale
November 24th, 2008, 00:49
Can you start it manually ?
Can you find something useful in /var/log/httpd-error.log?

myst
November 24th, 2008, 04:18
I have added the apache22_enable="YES" to the /etc/rc.conf file and the apache22 is in /usr/local/etc/

I am not sure what else I need to do in order to get it to auto start.

Suggestions?
Check the apache start script in /usr/local/etc/rc.d/

RudiK
November 24th, 2008, 06:46
a nice way to check that you have the correct line in your rc.conf is to run /usr/local/etc/rc.d/apache22 rcvar This should show apache22_enable="YES" if not then you have made a mistake in your rc.conf file.

DutchDaemon
November 24th, 2008, 11:32
Also run apachectl configtest to see if your config is preventing your Apache from starting up.

dpalme
November 24th, 2008, 19:11
Thanks everyone I think we got it working....for some reason when I built the apache22 port it did not create the data directory....duh, so to be sure that was all, I did a deisntall and rebuilt the port.....everything seems to be working now.

ghostcorps
February 22nd, 2011, 23:49
Hi Guys

I have a similar issue, when I reboot or run rcvar on any other function I get the message that Apache22 was not found, which is to be expected since there is no apache22 script in /etc/rc.d, eventhough it is a vanilla install from ports. And yet, it starts and runs without any issues as far as I can tell.

I also have a jailed webserver on top of this machine that does the exact same thing.

I find it is a bit odd that I have three functioning apache22 flags set (below)... how can this be? and can I fix it?

apache22_enable="YES"
apache22 ssl_enable="YES"
apache22_http_accept_enable="YES"


Thanks

DutchDaemon
February 23rd, 2011, 00:16
FreeBSD ports don't install anything under /etc, since that belongs to the base system. Ports install everything under /usr/local, and you should find the start scripts installed by ports in /usr/local/etc/rc.d/. This is a very important and thoroughly basic FreeBSD law: base system and add-on software are separated (a very small number of exceptions exist, namely ports that overrule elements of the base system, like Sendmail or BIND from ports, and some ports that like to play in /var).

Note that FreeBSD also has service, so you can run service apache22 rcvar instead of /usr/local/etc/rc.d/apache22 rcvar

service covers both /etc/rc.d and /usr/local/etc/rc.d, so it will run everything under both with the usual flags (start, stop, restart, rcvar, status).

BTW: note that it's apache22_ssl_enable

ghostcorps
February 23rd, 2011, 01:40
Thanks for the tips :)

I am barely self-taught and tend to nut things out as I think of things I want to do. I haven't really had any reason before to look into rc scripts before but it explains another issue I have been having though.

I don't know how the underscore went missing, but that was definitely the cause of the error in dmesg, I forgot to mention it, but I was getting the apache22 not found error at startup also. Oddly enough mod_ssl has been working.