# Help with Apache 2 - I am a Newbee



## rock-star_79 (Mar 24, 2007)

HI I am new to this forum and new to unix. I am not sure if this question belongs here but here it is. I've been trying to update Apache to 2.2.4 but am having problems. I was able to get every thing configured-compilled-installed but know I am not sure if it is working. When I try to start Apache 2.2.4 I get this message

_(13)Permission denied: httpd: could not open error log file /usr/local/apache2/logs/error_log.
Unable to open logs_

How can I fix this? Also how can I check to see if 2.2.4 is running and not 1.3.33


I edited the line Listen:80, in _/usr/local/apache2/conf/httpd.conf,_ and changed it to 8080 which removed the error I was getting regarding unable to accesse port. Should I have done this?

My other questions are:

How can I get Apache 2.2.4 to run at bootup? I found this "Here" tutorial should I use it and will it work. 

Apache 1.3.33 comes with OS X, since I have installed 2.2.4 should I keep 1.3.33 from running or no? If I am suppose to stop it and use only 2.2.4 how do I do this?

I know that their is a package that installs Apache, PHP, MySQL but I would preffer to install all individually myself.

Thanks and I can't wait for the responds.


----------



## macbri (Mar 25, 2007)

rock-star_79 said:
			
		

> _(13)Permission denied: httpd: could not open error log file /usr/local/apache2/logs/error_log.
> Unable to open logs_


First make sure the target directory for that logfile exists (/usr/local/apache2/logs/).  Then check that the log file, and indeed the directory it lives in, are owned by whatever user you've set up Apache 2 to run as.  For example if Apache 2 is running as user "apache" then /usr/local/apache2/logs and the /usr/local/apache2/logs/error_log file should be owned by that user.



			
				rock-star_79 said:
			
		

> How can I fix this? Also how can I check to see if 2.2.4 is running and not 1.3.33


 The standard Apache that ships with OS X writes its logfiles in /var/log/httpd, so the error above suggests you are running Apache 2.




			
				rock-star_79 said:
			
		

> I edited the line Listen:80, in _/usr/local/apache2/conf/httpd.conf,_ and changed it to 8080 which removed the error I was getting regarding unable to accesse port. Should I have done this?


Ports below 1024 can only be opened by privileged processes, hence Apache will usually start as root so that it can listen to port 80.  Make sure you're starting Apache as root.  Also make sure Apache 1 isn't already running or you won't be able to use port 80 (already in use).  Make sure "Personal Web Sharing" is disabled (run "System Preferences" and select "Sharing").


----------



## rock-star_79 (Mar 25, 2007)

Thanks for the responds. I was able to get Apache 2 running once I changed to root. However for some reason when I try to access System Preference/Sharing it takes forever to load, and when it finally opens I am unable to make changes, but Personal Web Sharing is Disable. Is this suppose to happen?

Also did you check the link I posted regarding getting Apache 2 to load up at boot? Is this why the sharing folder is acting funny?

I am unable to access my server from another computer, when I put http://www.mydomain it keeps asking me for my router password and does not bring up the Apache confirmation page. How can I fixed this? How can I access my servers /home/ directory (file sharing)?

I think that Apache 1.3.33 is still running because when I put httpd -v in the terminal it keeps bringing up Apache/1.3.33 not Apache 2.2.4, how come? Is their a way I can keep Apache 1.3.33 from running and leave Apache 2 running solo?

Sorry for so many questions but I've been working on this thing for 3 days and am getting frustated. Thanks for the help. Happy Sunday.


----------



## sylense (May 1, 2007)

The Personal Web Sharing preference pane is actually a GUI frontend for Apache 1.3.33, the one preinstalled.

You'll notice if you manually start it (apachectl start), then the box is checked, and if you manualy stop it (apachectl stop), then the box is unchecked.

I'm guessing this is what is causing the delay when opening the Sharing preference pane.

I haven't tried upgrading the preinstalled Apache, so I don't have any suggestions for getting around this.


----------

