Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > configuration and installation of apache under 10.2.1

configuration and installation of apache under 10.2.1
Thread Tools
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Oct 1, 2002, 09:54 PM
 
I have been running apache - php - mysql from source in 10.1.x with no problem (all compiled from source and stored in /usr/local/*) it however seems that Apple has made some major changes to how apache configures itself under 10.2.

Using the following commands to install apache:

cd /usr/local/src/apache_1.3.23
./configure --with-layout=Apache --prefix=/usr/local/apache --enable-shared=max --enable-module=all --server-uid=www --server-gid=www
make
make install

And when I run the:

/usr/local/apache/bin/apachectl configtest

It tells me that Apache is fine.

So their is nothing wrong with my apache. The problem is when I go to http://localhost it tells me:

##
Not Found

The requested URL / was not found on this server.


Apache/1.3.26 Server at mrburri.local Port 80
##

I believe this is because Apple somehow forces Apache to ignore the /usr/local/apache/conf/httpd.conf the one it should be reading and instead reads Apples conf files here.

/private/etc/httpd/users
/private/etc/httpd/users/mrburri.conf

As when I start Apache from the CL I get:

Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/mrburri.conf
/usr/sbin/apachectl restart: httpd started

So the question are:

1- Why did Apple f-u-c-k with the standard UNIX way? (I am guessing it is to allow each user of the system to have their own custom Apache conf file, just what my grandmother needs).

2- How do I make it so that Apache does it the correct way and reads only the /usr/local/apache/bin/httpd.conf file ?

Thanks for any help. I have been to the Apple Developer Site with no luck.
     
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Oct 1, 2002, 11:27 PM
 
First of all, if you have downloaded and compiled Apache, there's no way Apple can override the program operation to use a different conf.

Second, if this is for your grandmother, why do you need to recompile? why not use the standard version that ships with X?

Another telling point is that you report you:

cd /usr/local/src/apache_1.3.23

yet you're running...

Apache/1.3.26

Therefore it appears as though you're not actually running the apache you compiled.

I'd check the setup of your installation.
Gods don't kill people - people with Gods kill people.
     
dogwood  (op)
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Oct 2, 2002, 08:05 AM
 
Camelot thanks for pointing me to the simple fact that the version of apache I tried starting was not the version I installed.

I took a look around, and my some mechanism, my /usr/local/apache/bin/apachectl when passed the restart flag would try to invoke the built in Apache. /usr/sbin/apachectl

So I set about deleting all references to the Apple based apache install here:

rm -rf /usr/libexec/httpd
rm -rf /usr/share/httpd
rm -rf /private/etc/httpd
rm -rf /Library/Documentation/Services/apache
rm -rf /Library/Documentation/Services/apache_mod_ssl
rm /usr/sbin/httpd
rm /usr/sbin/apachectl
rm /usr/sbin/ab
rm /usr/sbin/rotatelogs
rm -rf /Library/Webserver
/usr/sbin/httpd
/usr/sbin/apachectl
/usr/sbin/apxs
/usr/libexec/httpd/*

There must be more but that seemed to do the trick. For the life of me I do not see why Apple uses this rather silly way of configuring services. Having a single Applications thrown into seven or more directories is silly if you could just place it all in one neat location
/usr/local/* . If Apps GUI Apps can stay in one place why cant the do the same for UNIX apps? Makes live so simple.


I then had to delete and reconfigure and installed my own apache and it works now fine. It seems that when you roll your own apache with all this Apple stuff floating around the two version hook into each other, causing both of them to break.

I wish Apple gave us the option not to install all these packages.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2