On March 28, 2012 4:49 , Guillaume Meurice <guillaume.meurice@xxxxxxxxx> wrote:In my opinion, it is much easier to leave everything Apple provides alone and install your custom build of Apache HTTP Server in a location where all of the files (binaries, configuration files, log files) are in completely different places than where Apple puts their copies. This prevents any conflicts between your stuff and Apple's stuff, and eliminates the need to do a lot of extra work to get your stuff to work correctly with Apple's management tools. It can be difficult to get your stuff to work with Apple's management tools because this is not something that Apple has intended, and they do not provide support or even good documentation for this. I recommend managing your custom build of Apache HTTP Server from the command line, and not from Apple's GUIs.
but now, I can't launch apache from the syst.pref. > shared > web sharing panels.
Use Console.app to check Apple's special log files to find out why you were unable to start httpd. Also check the httpd error log files, wherever you have configured httpd to put them. Alternatively, start httpd from the command line using "apachectl" or by starting it manually. Running "httpd -t" will do a check of your configuration files and will report any problems.Installing httpd will not normally destroy old configuration files; this is desired behavior.
More over, since the files under /etc/apache2/ seems not to have been modified by the newly installation, I was wondering if they still remains useful for configuring apache ?
However, there are a number of differences between directives for httpd 2.2 and httpd 2.4, and you will very likely need to change some directives in your httpd 2.2 configuration files in order to get your configuration to work with httpd 2.4. For details, see https://httpd.apache.org/docs/2.4/upgrading.html
To find out where your custom httpd is looking for its configuration files, run "httpd -V" and examine the value of SERVER_CONFIG_FILE. If the value does not begin with a / then prepend the value of HTTPD_ROOT to it.Yes, you will need to build a different version of mod_php for each version of PHP you want to use. You then control which version of PHP gets used by specifying the path to the corresponding version of mod_php via the LoadModule directive.
Last question : is there any option to tell apache which PHP to use ?
For example, to load the default version of PHP shipped by Apple:
LoadModule php5_module libexec/apache2/libphp5.so
(this loads libphp5.so from /usr/libexec/apache2/libphp5.so).
If you compile PHP 5.4.0, including mod_php, and you've installed this version of mod_php in /opt/mystuff/apache-httpd/libexec/libphp5.so, then you can load it using the following directive:
LoadModule php5_module /opt/mystuff/apache-httpd/libexec/libphp5.so
I hope this helps.
--
Mark Montague
mark@xxxxxxxxxxx