Opened 15 years ago
Closed 7 years ago
#21315 closed defect (fixed)
Apache2 install location does not seem to conform as well as it could to MacPorts installation directory guideline
Reported by: | macports-tickets@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.0 |
Keywords: | Cc: | imajes@…, anddam (Andrea D'Amore), akitada@…, sebastien.elet@…, Schamschula (Marius Schamschula) | |
Port: | apache2 |
Description
It was a while ago, and I believe, that the end of the discussion, I was asked to open a ticket, in which we could start the process of moving Apache2 to be more consistent with the layout of MacPorts.
See this rather long thread for the entire details http://lists.macosforge.org/pipermail/macports-users/2009-February/thread.html#13921
Change History (16)
comment:1 Changed 15 years ago by scott@…
Cc: | scott@… added |
---|
comment:3 Changed 15 years ago by scott@…
I should add, I am not looking to just have this "fixed". I wanted to start the dialogue of determining what the layout should be, then I can submit a port and we can talk about it from there.
comment:4 follow-up: 5 Changed 15 years ago by scott@…
My suggestion would be to follow the Apache 2 layout that Apple provides, but use prefix as "root".
- /etc/apache2 -> /opt/local/etc/apache2
- /usr/sbin/{apache bins} -> /opt/local/sbin/{apache bins}
- /var/log/apache2 -> /opt/local/var/log/apache2
- /usr/libexec/apache2/ -> /opt/local/libexec/apache2
The rest of the parts follow the same pattern. I think some discussion would need to be made as to where the actual http docs files live, if they live in prefix somewhere, or if they were to be pointed to /Library/WebServer/Documents. That I am not sure what would be the most logical structure to follow.
This all makes a lot of sense to me. I can see some resistance, as a lot of people are going to like the "clean" all in one place method. It comes at a sacrifice, to have to add a special sbin path to your PATH, when /opt/local/sbin/ could cover it fine. Those also coming from Apache 2 on OS X default, would feel much more at home, as they need not learn any new path locations, as long as they can re-reference in their head, that "prefix" becomes "/".
comment:5 follow-up: 7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | imajes@… added |
---|---|
Port: | apache2 added |
Replying to scott@…:
My suggestion would be to follow the Apache 2 layout that Apple provides, but use prefix as "root".
[snip]
The rest of the parts follow the same pattern.
Looks totally logical to me.
I think some discussion would need to be made as to where the actual http docs files live, if they live in prefix somewhere, or if they were to be pointed to /Library/WebServer/Documents. That I am not sure what would be the most logical structure to follow.
Should not be outside of ${prefix}. My vote is for ${prefix}/www/${name} which is where other web ports should be installing things I think. The DocumentRoot should possibly be set to something like ${prefix}/www/htdocs (usual apache naming) or ${prefix}/www/public (Zend Framework naming), possibly with nothing at all installed in that directory.
This all makes a lot of sense to me. I can see some resistance, as a lot of people are going to like the "clean" all in one place method.
I'm not sure why apache2 currently does it the way it does it. I'm not convinced it's because it was considered to be cleaner. James, do you remember?
comment:6 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
comment:7 Changed 15 years ago by scott@…
Replying to ryandesign@…:
I think some discussion would need to be made as to where the actual http docs files live, if they live in prefix somewhere, or if they were to be pointed to /Library/WebServer/Documents. That I am not sure what would be the most logical structure to follow.
Should not be outside of ${prefix}. My vote is for ${prefix}/www/${name} which is where other web ports should be installing things I think. The DocumentRoot should possibly be set to something like ${prefix}/www/htdocs (usual apache naming) or ${prefix}/www/public (Zend Framework naming), possibly with nothing at all installed in that directory.
Good points. Maybe this needs to be a "rule" of some form, or an established and rock solid location? Being able to port install phpmyadmin and load localhost/phpmyadmin and it just works, would be very nice to some. Sure, you can customize if you desire, but out of the box ports that fire up in a browser, could be a powerful thing for any local development box.
comment:10 follow-up: 11 Changed 15 years ago by sebastien.elet@…
I just tried to use amp via macport and the /opt/local is a mess... Personally use this layout to compile apache (/Users/Nasga/Documents/Damp/release-1.0 is my root for amp) :
<Layout SnowLeopard> prefix: /Users/Nasga/Documents/Damp/release-1.0 exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec+ mandir: ${prefix}/share/man sysconfdir: ${prefix}/etc+ datadir: ${prefix}/data installbuilddir: ${prefix}/share/httpd/build errordir: ${prefix}/share/httpd/error iconsdir: ${prefix}/share/httpd/icons htdocsdir: ${datadir}/www manualdir: ${prefix}/share/httpd/manual cgidir: ${datadir}/CGI-Executables includedir: ${prefix}/include+ localstatedir: ${prefix}/var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log+ proxycachedir: ${runtimedir}/proxy </Layout>
And for the .configure i add :
--enable-layout=SnowLeopard
I hope this could help :)
comment:11 Changed 15 years ago by scott@…
Replying to sebastien.elet@…:
I just tried to use amp via macport and the /opt/local is a mess... Personally use this layout to compile apache (/Users/Nasga/Documents/Damp/release-1.0 is my root for amp) :
<Layout SnowLeopard> prefix: /Users/Nasga/Documents/Damp/release-1.0 exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec+ mandir: ${prefix}/share/man sysconfdir: ${prefix}/etc+ datadir: ${prefix}/data installbuilddir: ${prefix}/share/httpd/build errordir: ${prefix}/share/httpd/error iconsdir: ${prefix}/share/httpd/icons htdocsdir: ${datadir}/www manualdir: ${prefix}/share/httpd/manual cgidir: ${datadir}/CGI-Executables includedir: ${prefix}/include+ localstatedir: ${prefix}/var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log+ proxycachedir: ${runtimedir}/proxy </Layout>And for the .configure i add :
--enable-layout=SnowLeopardI hope this could help :)
This would break the layout conventions outlined in MacPorts here http://guide.macports.org/#internals.hierarchy MacPorts desires to have almost all files installed into ${prefix} which is usually /opt/local
A location such as your user home would be off limits to MacPorts and it's installation of Apache2.
comment:12 Changed 15 years ago by sebastien.elet@…
I know, this was an exemple and i use this setup to avoid mess between my compiled binary and macport. (i'm also able to switch between different versions of apache/php/mysql while using this layout).
But actually, the apache2 port break also the layout conventions as this prefix is /opt/local/apache2 ...
Then it should be :
<Layout MacPort> prefix: /opt/local exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/libexec+ mandir: ${prefix}/share/man sysconfdir: ${prefix}/etc+ datadir: ${prefix}/data installbuilddir: ${prefix}/share/httpd/build errordir: ${prefix}/share/httpd/error iconsdir: ${prefix}/share/httpd/icons htdocsdir: ${datadir}/www manualdir: ${prefix}/share/httpd/manual cgidir: ${datadir}/CGI-Executables includedir: ${prefix}/include+ localstatedir: ${prefix}/var runtimedir: ${localstatedir}/run logfiledir: ${localstatedir}/log+ proxycachedir: ${runtimedir}/proxy </Layout>
According to the source, the mistake is just in trunk/dports/www/apache2/Portfile line 67 "configure.pre_args --prefix=${prefix}/${name}" should be "configure.pre_args --prefix=${prefix}"
I think the maintainer did this to keep apache1.3 working along apache2, but actually i doubt there will many people using apache1.3 :/
comment:14 Changed 10 years ago by jmroot (Joshua Root)
Cc: | ryandesign@… removed |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
comment:15 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Reporter: | changed from scott@… to macports-tickets@… |
---|
Reporter no longer wants to receive notifications.
comment:16 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | Schamschula added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
With the update of apache2 to 2.4.x, it now conforms to the directory layout guidelines.
Cc Me!