I was able to install Apache2, PHP5 and MySQL5 on my MacBook running Tiger and using root to start the Apache server manually. However - I am not able to get it to start automatically on reboot. I even added a line in etc/hostconfig:

APACHE2=-YES-

Having done the above - I still have to manually reboot the Apache server using the apachectl start command. Are there any other configurations I may have overlooked?

Thanks!

Richard

Recommended Answers

All 4 Replies

Do you have a startup script in your StartupItems?
http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/

Starting at boot
Off course you would want to start Apache2 at boot time and not have to manually start everything up after a reboot. To do this you need to download the ApacheStartupItems.tar archive and extract as root into ‘/Library/StartupItems’. You then need to add the following line to ‘/etc/hostconfig’ to enable the startup script

APACHE2=-YES-

If you change the YES into a NO, Apache2 won’t start after a reboot.

I installed it in Library/Apache2 as per instructions.

No, that was only the binaries and such. The instructions said to extract the ApacheStartupItems.tar archive (basically copy the entire Apache2 directory) into /Library/StartupItems/. If you don't put that directory into StartupItems, the script ain't gonna start.

Also make sure that Personal Web Sharing is disabled in the Sharing section of the System Preferences, and that the line in /etc/hostconfig regarding WEBSERVER= is set to -NO- .

No, that was only the binaries and such. The instructions said to extract the ApacheStartupItems.tar archive (basically copy the entire Apache2 directory) into /Library/StartupItems/. If you don't put that directory into StartupItems, the script ain't gonna start.

Also make sure that Personal Web Sharing is disabled in the Sharing section of the System Preferences, and that the line in /etc/hostconfig regarding WEBSERVER= is set to -NO- .

That last line did it - I had WEBSERVER set to -YES-. So I changed it - rebooted and voila - it served the index page! Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.