Forum Moderators: phranque

Message Too Old, No Replies

dual apache install on mac osx 10.5

         

DynamoPlight

7:26 am on Mar 28, 2010 (gmt 0)

10+ Year Member



Hi everyone,

I am brand new to web development and I just installed apache 2 on my MacBook, not knowing that my MackBook comes preloaded with apache on it. I downloaded the source from [httpd.apache.org...] and followed the compile and install instructions. I can start apache from terminal but I can't stop it. I went into the System Preferences and turned off web sharing, which I think shut down the default apache server, but now I think the new apache that I installed is still running because I can still see [localhost...] The reason I think the new apache is running is because after I turned off websharing, [localhost...] shows the index page I put in the new "Document Root" of the httpd.conf file I edited. Now it seems like I can't stop the apache server from running because I can always see [localhost...] I've tried "apachectl -k stop" and "httpd -k stop" in terminal and I get "httpd (no pid file) not running". I would really like to just have the apache that comes preloaded on the macbook and get rid of any damage I may have done with the new install. Does anybody have any suggestions that may help me? Thanks.

mack

9:40 am on Mar 28, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It defiantly sounds like you have a conflict. I think the first thing you need to do is work out if you have two full installs, or one mutant install where the newly installed version has been placed in the same location.

If you have two installs the removal for the latest install might be a simple case of deleting the folder. You need to be sure you are removing the correct version though!

Mack.

DynamoPlight

5:24 am on Mar 29, 2010 (gmt 0)

10+ Year Member



Thanks for the reply Mack,

I will try to find out if I actually have 2 installs or a mutant install. Here is an update on my situation: For some reason I am able to stop apache now. I shutdown and just started using the Web Sharing option in Mac OSX's System preferences. If I turn this on an off, apache will turn on an off...which is great. Now I wanted to test if I could do this using the terminal commands. I found out that this works as well. I might have been having problems before because I might have altered a config file (specifically the listening port to something other than 80) while apache was running and this might have prevented me from stopping apache. I don't know if that is the reason, does anybody know if that is possible. Anyways, I still don't know if installing the newest version of apache overwrote the apache that comes with mac osx, mixed into the apache that comes with mac osx, or created a seperate directory and hence a seperate version of apache. I guess for now I have to look into where the preinstalled version of apache was installed. Does anybody know about this on a Mac? I know that the apache that I downloaded gets installed into /usr/local/apache2. I have also found apache files (the httpd) in /usr/sbin/httpd. I have also found apache config files in /private/etc/apache2/ (specifically httpd.conf. If anybody could shed some light on why there is another httpd in the usr/sbin directory and another config file in /private/etc/apache2/ that would help me. Is it because I have 2 different installs? or are these files supposed to be spread out like this? Thanks.

DynamoPlight

5:28 am on Mar 29, 2010 (gmt 0)

10+ Year Member



Update: also I probably installed the new apache while the old one was running (web sharing was turned on), so this might have caused me the problem of not being able to stop apache. Does anybody know this to be true? Thanks.

DynamoPlight

7:57 am on Mar 29, 2010 (gmt 0)

10+ Year Member



Update: For anybody else who has a mac and wants to run apache, I would recommend visiting [diymacserver.com...] . This site has information about overwriting the default apache installation on a mac, or creating a separate install of apache on a mac. As for my situation, according to this website, I did NOT overwrite the default version. I checked the config.layout file and since I used <Layout Apache> it looks like I did not overwrite anything, cause I checked it against <Layout Darwin> (which the website says will overwrite the leopard installation) and none of the paths coincide.