RFC: Changing apache2 to install its files to /opt/local/ instead of /opt/local/apache2

Ryan Schmidt ryandesign at macports.org
Sat Mar 1 22:57:53 PST 2008


On Mar 1, 2008, at 08:56, Matthew Ross wrote:

> On Mar 1, 2008, at 7:30 AM, js wrote:
>
>> As you know, current apache2 port uses /opt/local/apache2 as a  
>> prefix.
>> This is a bit different from other ports using /opt/local as a  
>> prefix.
>> This problem always confused me, so I think it would be nice if
>> it changed to use the same prefix.
>> This change, however, would need a lot of work,
>> like changing paths inside the httpd.conf,
>> but if you'd like this idea, I'd be willing to help to get it done.
>>
>> Could you please give me some comments/suggestions on this?
>
> I have been wanting this for a long time.
> If I were you, I would look at patching the config.layout with a new
> layout.
> You can then configure with --enable-layout=LAYOUT.
> I believe this takes care of the paths in the default httpd.conf file
> for you.

Before anyone does anything, I'd like to know why you want this  
change. Let's figure out the pros and cons.

A con would be that all ports that depend on apache2 would have to be  
checked. They may have hard-coded the location where apache2 puts its  
files now.

Also, all existing users of apache2 would have to move their  
httpd.conf files to the new location, and maybe update paths in it.  
Anyone who just runs "sudo port upgrade apache2" will find their web  
server suddenly broken.

Note that the apache port has a variant "apache_layout" which puts  
files in a different place than usual. I think this is problematic  
because some ports that depend on apache assume that the apache port  
is installed either with or without this variant, and don't work in  
the other case. There should be no such variant; the port should just  
install files in a single place.

The apache, apache2 and apache20 ports should be kept in sync if  
possible.

The apache port should be able to coexist with either the apache2 or  
the apache20 port. Currently, they cannot coexist:

$ sudo port activate apache
Password:
--->  Activating apache
Error: port activate failed: Image error: /opt/local/share/man/man1/ 
dbmmanage.1.gz is being used by the active apache2 port.  Please  
deactivate this port first, or use the -f flag to force the activation.
$



More information about the macports-dev mailing list