Universal Binary Apache 2 configure Line
Miscellaneous — 12 May 2006 00:27 — 1401 days ago

A Universal Binary Apache 2 web server seems to be quite easy to build. Here’s the configure line I used:

CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \ ./configure \ --prefix=/usr/local/apache2 \ --enable-mods-shared=all \ --enable-proxy-balancer \ --enable-proxy-ajp \ --enable-proxy-http \ --enable-proxy-ftp \ --enable-proxy-connect \ --enable-proxy \ --enable-ssl \ --enable-so

You can download a compiled tarball here. Unpack it in /usr/local and you’ll get the “apache2” directory.

Comments
Posted by Ahmed Nuaman on 30 Oct 2006 17:44

I get this:

su: ./configure: No such file or directory

Posted by Marc on 31 Oct 2006 00:28

Why are you using "su"?

Posted by Ed on 2 Nov 2006 05:23

I'm trying this and it errors out saying...

checking for C compiler default output file name... configure: error: C compiler cannot create executables

Any ideas?

Posted by Marc on 2 Nov 2006 09:17

Check the config.log file, towards the end you should see an error message that explains what's wrong. You *are* on Tiger, right?

Posted by Ed on 2 Nov 2006 17:20

I honestly don't know if I'm on "Tiger", but I About This Mac reports Mac OS X Version 10.4.8. I go to a unix prompt and uname -a reports Darwin Kernel Version 8.7.0. I checked and the directory /Developer/SDKs/MacOSX10.4u.sdk does exist. Does that tell you if I'm using Tiger?

The compile works if I leave out the CFLAGS line. Apache2 installs and works without the CFLAGS.

I'm trying to get Apache2 to work with the CFLAGS in hopes of resolving a problem with compiling PHP5.1.6 with support for MySQL.

Posted by Patrick on 25 Jan 2007 20:08

I'm receiving the

"./configure: No such file or directory"

message as well. I'm on Tiger (10.4.8) and have Dev Tools installed. Any ideas?

Posted by Marc on 25 Jan 2007 22:08

Are you actually in an Apache 2 source distribution directory when you execute the command?

Posted by tiago on 3 Feb 2007 16:30

hi...

after installing the 4.3.11 package on OSX 10.3.9, the sharing control panel gives me a wrong link to the main and user site. instead of using dots to separate the numbers in the IP address, it uses hifens... this is probably not a big issue (so far i haven't detected any serious problems resulting) but have you got any idea on how i can correct this?

Posted by JY on 16 Feb 2007 23:48

If you get errors about apr at compile time, or errors about a missing expat lib at apache runtime, that means you have some other apr/expat libs elsewhere on your system.

Then try to use these additional options :

--with-included-apr (it's new since a few apache releases).

--with-expat=builtin (it is used by apr, otherwise it uses an existing expat lib if found in /usr/local/lib )

Posted by colin on 17 Feb 2007 01:19

What is the proper command-line for unpacking apache into /usr/local using tar?

Posted by Steven on 2 Mar 2007 23:23

I tried to install it and it was really simple. It worked right away.

Posted by Carl on 5 Mar 2007 22:51

Really does anybody know what is the proper command-line for unpacking apache into /usr/local using tar? I tried some combinations but they don't work.

Posted by Marc on 5 Mar 2007 23:36

Carl, here is a command line (two actually :-) that should work. This unpacks the tar file straight off my server.

cd /usr/local

curl -s http://www2.entropy.ch/download/apache2-2.2.3-macosx-universal.tar.gz | sudo tar -xzvf -

Posted by mikeh on 8 Mar 2007 01:47

Thanks for this. Works well.

Posted by dave proc on 21 Mar 2007 21:01

I must be an idiot, but when I unpack, therre is no configure file in /usr/local/apache2
just a bunch of directories

Posted by Marc on 21 Mar 2007 21:12

The key word in that last sentence is "compiled". It means that I ran the configure command and packaged up the *result*, the finished, compiled Apache 2, so you don't have to build from source code.

The configure script is part of the *source* package.

Posted by dave proc on 21 Mar 2007 22:42

Told ya I was an idiot, did I mention I don't read for comprehension.

Thanks Marc

Posted by Dmitry on 4 Apr 2007 13:42

Great simple configuration, thanks!

Posted by Trevor on 9 Apr 2007 00:01

Thanks for the clarification. I also encountered a few problems but you helped a lot Marc.

Posted by Jon on 11 Apr 2007 21:35

When installing Apache2 everything configures and runs fine.

When trying to use the "entropy-php.mpkg" extracted from "entropy-php-5.2.1-1-apache2.tar.gz" I get "Please try installing again." It also always shows as an upgrade instead of an install.

The installer log shows that the run postflight script failed.

When running "apachectl configtest" I get the following:
Processing config file: /private/etc/httpd/users/+entropy-php.conf
Syntax error on line 8 of /private/etc/httpd/users/+entropy-php.conf:
Cannot load /usr/local/php5/libphp5.so into server: (reason unknown)

I've done this installation before without any problems, but this one has me stumped. I've removed and reinstalled both Apache2 and PHP5 several times.

Thanks in advance for any insight.

Posted by Michael on 16 Apr 2007 22:56

Yes, I know I’m a complete noob at this but I am willing to face public humiliation for help. I am trying to get apache2 started on my computer. I have 10.4.9 installed. Below is what I am doing.

Last login: Mon Apr 16 13:50:08 on ttyp1
Welcome to Darwin!
michael:~ michael$ cd /usr/local
michael:/usr/local michael$ ls
apache2
michael:/usr/local michael$ CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
> ./configure \
> --prefix=/usr/local/apache2 \
> --enable-mods-shared=all \
> --enable-proxy-balancer \
> --enable-proxy-ajp \
> --enable-proxy-http \
> --enable-proxy-ftp \
> --enable-proxy-connect \
> --enable-proxy \
> --enable-ssl \
> --enable-so
-bash: ./configure: No such file or directory
michael:/usr/local michael$

Posted by Michael Nease on 18 Apr 2007 00:08

^^^---My own comment made me laugh...lol.---^^

It works!

Posted by Martin on 26 May 2007 13:56

Michael, LOL :)

Posted by Pagod on 26 Jun 2007 21:21

Hi everyone!

hope someone is still reading this...
i thought it might be fun to upgrade my apache server from 1.3 to 2.2, although i'm really no expert in that domain. i've downloaded the compiled tarball, expanded, that's fine. but before i go any further, i thought i'd rather ask a stupid question than do something stupid, so perhaps someone can give me an answer: how do i tell Mac OS that it should start the new version of apache (from /usr/local/apache2), using /usr/local/apache2/bin/apachectl and /usr/local/apache2/conf/httpd.conf, rather than the pre-installed version using /usr/bin/apachectl and /etc/httpd/httpd.conf? of course, i can start the correct version on the command line, but can it be configured to work also from the system preferences?

and when i've installed apache2, how can i "uninstall" the previous version? should i hunt for the files and remove them by hand? i expect getting the same hierarchy as before (config in /etc/httpd/, logs in /private/var/log/httpd, ...) is not really an option?

thx a lot in advance!

Pagod

Powered By blojsom