Included in our product release we ship Apache HTTP Server binaries that people have put together on our (UNIX) development machine.

We tell our clients to set up the binaries (on their own UNIX servers) underneath the same directory structure that people put together it under. For many clients this isn't appropriate, e.g. where you will find limitations on where they are able to install software on their own servers plus they don't wish to compile Apache themselves.

It is possible to method of producing Apache HTTP Server so its installation location(s) could be specified dynamically using atmosphere variables ?

I spent a couple of days attempting to sort this out and could not try to get it done. It brought me to think the Apache binaries were hard coding some directory pathways at compilation stopping the portability we require.

Has anybody handled to get this done ?

I believe the best way to do(circumvent) this issue would be to create a "./configure &lifier&lifier make" script that the client uses to set up, specify and compile the binaries. That will offcourse require the client has all of the source-code placed on his server or allow it to be on an NFS share.

I believe the best way to do(circumvent) this issue would be to create a "./configure &lifier&lifier make" script that the client uses to set up, specify and compile the binaries. That will offcourse require the client has all of the source-code placed on his server or allow it to be on an NFS share.

As well as an entire build toolchain. Nowadays, GCC does not come default with many major distributions. Would not it be sane to pressure the customer to set up it to /opt/my_apache2/ or something like that like this?

If you're producing Apache2 for the location but would like your clients to have the ability to do the installation elsewhere (and I am presuming they have a similar architecture and OS as the build machine) then it can be done however the apachectl script will require some after-market hacking.

I simply examined these steps:

  1. Unpacked the Apache2 source (this will use Apache 1.3 too though) and went ./configure --prefix=/opt/apache2

  2. Went make then sudo make install to set up around the build machine.

  3. Change to the install directory (/opt/apache2) and tar and gzip in the binaries and config files. I made use of compact disc /opt/apache2 sudo tar cf - apache2 gzip -c > ~/apache2.tar.gz

  4. Slowly move the tar file towards the target machine. I made the decision to set up in /opt/mynewdir/serta/apache2 to check. So essentially, your customers can't use revoltions per minute or anything like this -- unless of course you are aware how to create that relocatable (I do not :-) ).

  5. Anyway, your client's conf/httpd.conf file is going to be filled with hard-coded absolute pathways -- they are able to just change those to anything they need. The apachectl script also offers hard coded pathways. It is simply a spend script so that you can hack it or provide them with a sed script to transform that old pathways out of your build machine towards the new path in your clients.

  6. I missed everything hackery and merely went ./bin/httpd -f /opt/mynewdir/serta/conf/httpd.conf :-)

Hope that can help. Tell us any error messages you receive when not on your side.

@Hissohathair

I would recommend 1 switch to @Hissohathair's answer.

6). ./bin/httpd -d <server path> (although it can be overridden in the config file)

In apacheclt there's a flexible for HTTPD enabling you to override for doing things.