If you want to install Apache on Leopard please read this blog post on my DIYMacServer.com blog which explains the differences in the installation procedure.
To install Apache on Mac OS X there are several possibilities. Several people and organisations like Server Logistics and Marc Liyanage provide a binary installation package. But don’t like the dependancy on others to update their package quickly when there might be a security issue or a problem. It also provides the possibility to tweak the configuration to ones own use.
For the MySQL installation I choose to use the binaries because they come from the developers themselves. Which means that updates are released as soon as they are available.
The compilation and installation of Apache is relatively simple. Download the source from www.apache.org, I’ve used version 2.2.4 to do this. It was the latest version available when I last checked.
Unpack the downloaded archive and edit the file ‘config.layout’ you will find there. Add the following lines to the file at the bottom or download a ready made file from the resources section at the bottom of this page:
<Layout Richard5>
prefix: /Library/Apache2
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/bin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/modules
mandir: ${prefix}/man
sysconfdir: ${prefix}/conf
datadir: ${prefix}
installbuilddir: ${datadir}/build
errordir: ${datadir}/error
iconsdir: ${datadir}/icons
htdocsdir: ${datadir}/htdocs
manualdir: ${datadir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${prefix}/include
localstatedir: ${prefix}
runtimedir: ${localstatedir}/logs
logfiledir: ${localstatedir}/logs
proxycachedir: ${localstatedir}/proxy
</Layout>
When you saved the additional Layout which defines what goes where you’re ready to continue. Open a Terminal session enter the directory in which you extracted the archive and edited the ‘config.layout’. Use a normal user to execute the following the commands, please note difference for Intel or PowerPC based Mac’s:
For Intel:
CFLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --enable-layout=Richard5 \ --enable-mods-shared=all \ --with-ssl=/usr \ --with-mpm=prefork \ --enable-ssl \ --enable-dav \ --enable-cache \ --enable-proxy \ --enable-shared \ --disable-static \ --disable-unique-id \ --disable-ipv6 \ --enable-logio \ --enable-deflate \ --with-ldap \ --with-ldap-include=/usr/include \ --with-ldap-lib=/usr/lib \ --with-included-apr \ --enable-ldap \ --enable-auth-ldap \ --enable-cgi \ --enable-cgid \ --enable-suexec
For PowerPC:
CFLAGS="-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \ ./configure --enable-layout=Richard5 \ --enable-mods-shared=all \ --with-ssl=/usr \ --with-mpm=prefork \ --enable-ssl \ --enable-dav \ --enable-cache \ --enable-proxy \ --enable-shared \ --disable-static \ --disable-unique-id \ --disable-ipv6 \ --enable-logio \ --enable-deflate \ --with-ldap \ --with-ldap-include=/usr/include \ --with-ldap-lib=/usr/lib \ --with-included-apr \ --enable-ldap \ --enable-auth-ldap \ --enable-cgi \ --enable-cgid \ --enable-suexec
and follow with:
make
If these processes end without error you are ready to install issue the following command:
sudo make install
If this all is to difficult you can download the compilation script and execute that from the source directory.
Apache is now installed in /Library/Apache2, your websites html and php should be located in /Library/Apache2/htdocs. You can configure your web server with the ‘httpd.conf’ located in /Library/Apache2/conf
Starting at boot
Off course you would want to start Apache2 at boot time and not have to manually start everything up after a reboot. To do this you need to download the ApacheStartupItems.tar archive and extract as root into ‘/Library/StartupItems’. You then need to add the following line to ‘/etc/hostconfig’ to enable the startup script
APACHE2=-YES-
If you change the YES into a NO, Apache2 won’t start after a reboot.
Extra:
To use virtual hosts in your Apache setup read: Adding virtual hosts to your Apache installation
To use SSL in you Apache setup read: How to secure (HTTPS) your virtual domains
Resources:
April 6th, 2006 at 9:09 pm
First of all, thank you Richard for your work.
When I install Apache 2.2.0, I obtain many errors relating to LDAP.
The first error is :
util_ldap.c:41:2: error: #error mod_ldap requires APR-util to have LDAP support built in
(But all is ok if I install Apache 2.0.55.)
What’s about APR-util ?
The station for my Web Server is under Mac OS X 10.4.6 (there is not yet MySQL, nor PHP).
Richard5: The issue was solved, the erorr was caused by previous installs and tests from Darwinports.
May 17th, 2006 at 11:20 pm
i have tested this with teh intel version and apache wont start up.
it seg faults.
Its a clean install and i did your instructions just as you described.
something is not the same on the ppc as the intel….
OS Version: 10.4.6 (Build 8I1119)
Report Version: 4
Command: httpd
Path: httpd
Parent: sh [277]
Version: ??? (???)
PID: 287
Thread: 0
Exception: EXC_BAD_ACCESS (0×0001)
Codes: KERN_INVALID_ADDRESS (0×0001) at 0xc0000000
Thread 0 Crashed:
0 httpd 0×0002cb78 compile_regex + 2434 (pcre.c:2463)
1 > 0xffffffff 0 + -1
May 17th, 2006 at 11:23 pm
Here is some more info :
duck:~ av$ /Library/Apache2/bin/apachectl start
/Library/Apache2/bin/apachectl: line 102: 246 Segmentation fault $HTTPD -k $ARGV
hope someone can fix this soon - my old linux server just burned…
keep up the good work Big R
June 10th, 2006 at 9:15 am
I had the same problem as Andy with Apache 2.2.2. The problem is clearly in the PCRE library. Just for fun, I downloaded PCRE 6.6, the newest, built it, and ran their tests. Here’s what “make check” does:
~/src/pcre-6.6 $ make check
PCRE version 6.6 06-Feb-2006
Test 1: main functionality (Perl compatible)
./RunTest: line 124: 2663 Segmentation fault $valgrind ./pcretest -q $testdata/testinput1 testtry
make: *** [runtest] Error 1
I’m also running on an Intel Mac, with 10.4.6. I’ll look into this some more.
June 10th, 2006 at 9:23 am
I didn’t explore far enough into this blog. The page about compiling issues at http://switch.richard5.net/2006/05/19/compiling-issues-with-os-x-on-the-intel-platform/ had the answer.
I didn’t necessarily want a universal binary, but changing the configure command for PCRE from
./configure
to
CFLAGS=”-arch i386″ ./configure
did the trick and fixed the seg. fault in the pcre tests. I’m sure it will fix apache 2.2.2 up too.
I agree that this is odd that you need to do this. I’m still on Xcode 2.2, though. Guess I should download Xcode 2.3.
June 17th, 2006 at 5:48 am
Hi there - I successfully compiled Apache 2.2.2 on an Intel Mini with XCode 2.2.1 after a bit of trial and error (it’s a good thing these machines compile reasonably fast
This worked for me:
export CFLAGS=”-arch i386″
./configure –prefix=/usr/local/httpd-2.2.2 –enable-mods-shared=all –enable-ssl –enable-so
July 5th, 2006 at 6:53 pm
How to start Apache2 manually though ?
Richard5: You can start it manually by typing the following command in the terminal:
/Library/Apache2/bin/apachectl start
August 11th, 2006 at 6:47 pm
You can also use the Personal Web Sharing section in System preferences if you do the following:
Add this line to your httpd.conf file:
PidFile /private/var/run/httpd.pid
Then rename /usr/sbin/apachectl to apachectl-1.3
and copy (don’t link)
/apache2/bin/apachectl to /usr/sbin/
Instructions taken from here:
http://www.macosxhints.com/article.php?story=20041217125121976&query=apache
August 24th, 2006 at 7:55 pm
It would be really helpful to add Paul’s above comment to the instructions, took me bout 15 min to figure out why my new server wasnt working and how to get it all set up so I could replace the old.
Thanks!
September 2nd, 2006 at 7:57 pm
once i have executed the intel version of your commands I got also this note:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.
Is this a big problem?
But the worst problem is when i try to give the make command. this is the result:
-bash: make: command not found
I’m on an intel macbook pro
best regards and thanks for your useful blog
Richard5: Forgot to install the Developer tools !
September 8th, 2006 at 4:02 am
Luke, you have to install de Developer Tools suite. Search on your HD for the folder /Developer. If it doesn’t exists or is empty then install Developer Tools from your OS X installation media (CDs, DVDs)
I wanna comment that the configuration described here doesn’t work for me on ppc 10.4.7 with Apache 2.2.3.
Best regards,
Poppy
September 9th, 2006 at 1:08 am
Thanx Richard.
At the end of the day (or more precise at the midnight’s end). The configure command-line that works on OS X ppc 10.4.7 with Apache 2.2.3 is described in this message.
By the way, I prefer the Apache2 home at “/usr/local/apache2″ because I think is more unix standard. So I can take the same configure command for any of my customer’s hosts (mostly FreeBSD, I really love it
or Debian if I have not choose)
CFLAGS=”-arch ppc -O2″ \
./configure \
–prefix=/usr/local/apache2 \
–mandir=/usr/share/man \
–enable-layout=Apache \
–enable-so \
–disable-unique-id \
–enable-asis \
–enable-logio \
–enable-rewrite \
–enable-speling \
–enable-setenvif \
–enable-cgi \
–enable-cgid \
–enable-dav \
–enable-proxy \
–with-z=/usr \
–enable-cache \
–enable-mem_cache \
–enable-ssl=/usr \
–enable-mods-shared=all \
–enable-mime_magic \
–enable-negotiation \
–enable-deflate \
–enable-suexec \
–with-suexec-uidmin=70 \
–with-suexec-gidmin=70 \
–with-suexec-safepath=/bin:/usr/bin:/usr/local/bin \
–with-ldap \
–enable-auth-ldap \
–disable-static \
–enable-shared=max \
–with-mpm=prefork
I really don’t know what the “-isysroot /Developer/SDKs/MacOSX10.4u.sdk” option means. But with it, I get errors about ‘pcre’ library.
In the next command-line uidmin=70 refers to user http://www. And gidmin=70 refers to group http://www. Obviously the DocumentRoot folder have to be accesible by these uid/gid. I recommend copy the entire configure text and paste on a script file like ‘myconfigure.sh’ Just in case someone have to test and retest the options.
I had compiled Apache2 OK with mpm=worker and it works. But loading mod_php 4.4.4 didn’t work (sure I had compiled PHP with thread-safety). So I stay on Apache2 mpm=prefork (It’s a same not aproach Darwin threading).
For Apache 2.2.3:
CFLAGS=”-arch ppc -O2″ \
./configure \
–prefix=/usr/local/apache2 \
–mandir=/usr/share/man \
–enable-layout=Apache \
–enable-so \
–disable-unique-id \
–enable-asis \
–enable-logio \
–enable-rewrite \
–enable-speling \
–enable-setenvif \
–enable-cgi \
–enable-cgid \
–enable-dav \
–enable-proxy \
–with-z=/usr \
–enable-cache \
–enable-mem_cache \
–enable-ssl=/usr \
–enable-mods-shared=all \
–enable-mime_magic \
–enable-negotiation \
–enable-deflate \
–enable-suexec \
–with-suexec-uidmin=70 \
–with-suexec-gidmin=70 \
–with-suexec-safepath=/bin:/usr/bin:/usr/local/bin \
–with-ldap \
–enable-auth-ldap \
–disable-static \
–enable-shared=max \
–with-mpm=prefork
For PHP 4.4.4 with Interbase, OpenSSL, kerberos, mcrypt, sockets and curl:
./configure –sysconfdir=/etc \
–prefix=/usr \
–mandir=/usr/share/man \
–disable-pear \
–disable-debug \
–enable-force-cgi-redirect \
–with-tsrm-pthreads \
–with-apxs2=/usr/local/apache2/bin/apxs \
–with-interbase=/Library/Frameworks/Firebird.framework \
–with-curl \
–with-zlib-dir=/usr \
–enable-sockets \
–with-openssl \
–with-kerberos \
–with-xml \
–with-mcrypt
libmcrypt was downloaded and compiled without any trouble from http://easynews.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz
Firebird 1.5.2 SuperServer was installed with the package provided by ibphoenix.com. But I had to make two symbolic links under /Library/Firebird.framework in order to link it with PHP:
sudo ln -s /Library/Frameworks/Firebird.framework/Headers /Library/Frameworks/Firebird.framework/Include
sudo mkdir /Library/Frameworks/Firebird.framework/lib
sudo ln -s /Library/Frameworks/Firebird.framework/Firebird /Library/Frameworks/Firebird.framework/lib/Firebird
(And had to patch the configure for php, all about IBASE_xxxx variables and gds. but this message it’s too large now). You have to change any reference or text like ‘-l gds’ or ‘-L IBASE_LIB’ to ‘-framework Firebird’
Best Regards
-PoppyPsycho
September 12th, 2006 at 3:31 pm
I have tried to compile with “-arch ppc -arch i386″ and get the error below when running ‘make’.
collect2: ld returned 1 exit status
lipo: can’t open input file: /var/tmp//ccjr1l0p.out (No such file or directory)
make[1]: *** [httpd] Error 1
make: *** [all-recursive] Error 1
The error seems obvious when looking at the input file as there is the “//” which should cause an error. But, I have also compiled with just “-arch i386″ and I got farther but got an error during ’sudo make install’.
make[2]: *** [install] Error 64
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
I am on OS X 10.4.7 with XCode 2.2.1 and I am trying to install Apache 2.2.3. I have tried googling my errors and checking apache.org and no relevant errors seem to show up. Any assistance would be appreciated.
regards,
xMiles Tegx
Richard5: Miles forgot to include some of the compiler flags and the issue was solved. Please don’t forget to run ‘make clean’ when you change and rerun the ./configure command.
September 30th, 2006 at 8:55 am
I just compiled Apache2 succesfully but get following error when starting the server using apachectl:
dyld: Symbol not found: _XmlParseXmlDeclNS
Referenced from: /usr/local/apache2/lib/libexpat.0.dylib
Expected in: flat namespace
/usr/local/apache2/bin/apachectl: line 102: 21991 Trace/BPT trap $HTTPD -k $ARGV
I am also on the same configuration as Miles.
Thanks for your advice!
Regards,
Nikolai
October 9th, 2006 at 8:48 pm
I do the install for intel as listed on my mbpro and get the following error on startup:
$ sudo /Library/Apache2/bin/apachectl start
httpd: Syntax error on line 207 of /Library/Apache2/conf/httpd.conf: Cannot load /usr/libexec/httpd/mod_log_config.so into server: Symbol not found: _ap_month_snames\n Referenced from: /usr/libexec/httpd/mod_log_config.so\n Expected in: flat namespace\n
If I comment out mod_log_config in the httpd.conf, I just get another error on the next module loaded.
Haven’t been able to get this working. Any help would be appreciated.
October 11th, 2006 at 9:06 pm
Relationship of Apache/1.3.33 (Darwin) to Richard5 Install of Apache 2?
Mac OS X Server 10.4.8
Machine Name: Power Mac G5
Machine Model: PowerMac7,3
CPU Type: PowerPC G5 (3.0)
going for httpd-2.2.3
apachectl started from within apache2/bin/ seems to invoke Apache/1.3.33 and Mac OS X Server Admin picks it up accordingly?
Why?
How is /etc/httpd/sites/*.conf related to the Richard5 installation of apache2?
Why does localhost not work?
Played about with:
http://developer.apple.com/tools/subversionxcode.html
http://www.phpmac.com/articles.php?view=237
and ran into similar problems.
Could you please help?
October 21st, 2006 at 11:45 pm
use the full path to the right apachectl, or cd into the directory and use ./apachectl otherwise your path variable will dictate which gets used
October 28th, 2006 at 6:59 pm
After these instructions, I found that on startup I always got the following error messages in error_log:
[Sat Oct 28 08:57:29 2006] [crit] (70023)This function has not been implemented on this platform: DBD: failed to initialise
[Sat Oct 28 08:57:29 2006] [crit] (70023)This function has not been implemented on this platform: DBD: driver for [DBDriver unset] not available
After much research, and a users@httpd.apache.org query, I learned that this was the mod_dbd module complaining that it hasn’t been configured with a SQL driver. This is weird, because I’m not using SQL at all. Solution: comment out the line that loads mod_dbd.
Thanks,
Dan
November 1st, 2006 at 6:39 am
the CFLAGS commnad keeps giving me an error of ‘Command Not Found’. Developer tools with XCode 2.1 is installed… what gives??
November 1st, 2006 at 6:45 am
Sorry… in the previous post i neglected to id my platform as a mac mini 1.42GHz PPC with 1gb ram running 10.4.8
The GCC compiler is v4.0 located in /usr/bin
November 5th, 2006 at 12:29 pm
Hi,
your tutorials are really great!
I wonder how this apache2 installation plays with the “personal websharing” thing from SYSTEM->SHARING
If i understand correctly, than this has to be turned out and is no longer usable when the apache2 is installed.. correct?
greetings,
Dave
November 10th, 2006 at 3:14 am
how do you make it so it starts at boot, i cant find the file to edit, it would be a lot more helpful if you could put exactly where the file would be found because i cant even find it with spotlight :S
January 11th, 2007 at 6:22 pm
I had to add –with-included-apr for the compile to work, since I had a apr-1-config binary that gave the wrong answer to where files should go.
January 12th, 2007 at 8:44 pm
Hi,
I’m having a bit of a problem here man, I’ve noticed that you said you have Apache 2.2.3 running successfully on your server now. Well see the problem I’m having is updating from Apache 2.0.52 which I initially installed from server logistics to Apache 2.2.3 which I’ve taken advise from your post. The problem is I’m not able to start my server due to the following error…
API module structure `access_module’ in file /Library/Apache2/modules/mod_access.so is garbled - perhaps this is not an Apache module DSO?
If I comment out that module in my httpd.conf file then it just throws me another error on the next module…
Any suggestions please???
oh btw Im running Mac OS X 10.4.8
thanks
Sal
January 13th, 2007 at 11:05 am
To solve your problem take the following steps:
- put your httpd.conf in a safe place for later reference
- delete the entire /Library/Apache2 directory, but if you need to keep apache running whilst upgrading, just delete the conf, lib and modules dir.
- perform the “sudo make install” again, or start from the beginning.
- update the new httpd.conf with your settings (except the modules) from the original!
Hope this helps
January 14th, 2007 at 6:50 pm
OS X 10.4.8
Intel mac
Hello, I really need some help, I messed up my original Apache came with the mac, my intention is to make Apache2 work with the mac system preferece, but now, the preference doesn’t work and the firewall doesn’t work, and I can’t get Apache2 go though the fire wall. What i did is like this:
(I didn’t make apache1.3 backup, so very frustrated)
(over writed the apachectl and httpd in /usr/sbin)
(the apache version is 2.2.4)
./configure –enable-layout=Darwin
–with-apr=/usr/local/apr
–with-apr-util=/usr/local/apr
–enable-mods-shared=all
–enable-rewrite –enable-proxy –enable-proxy-http –with-ssl=/usr –enable-ssl –enable-auth-anon –enable-auth-dbm –enable-auth-digest –enable-cache –enable-cern-meta –enable-charset-lite –enable-dav –enable-dav-fs –enable-dav-lock –enable-deflate –enable-disk-cache –enable-expires –enable-ext-filter –enable-file-cache –enable-headers –enable-info –enable-logio –enable-mem-cache –enable-mime-magic –enable-proxy-ftp –enable-speling –enable-unique-id –enable-usertrack
make
make install
the Apache2 can start up from the terminal, but I can’t let it go though the firewall (unless I turn the firewall off).
I added the following line in the /etc/apache2/httpd.conf file:
PidFile “/private/var/run/httpd.pid”
ScoreBoardFile “/private/var/run/httpd.scoreboard”
hoping I can use control the apache2 from preference panel, but it never happend.
All it says is “web sharing is not installed on this computer. To install Web Sharing, use the Mac OS X installer.”
If I can’t turn web sharing on, the firewall won’t turn on.
please, some one help!!!
January 15th, 2007 at 2:21 am
Hi there, i’m having the same issue as Nikolai
After compiling (with many different configs) i get:
dyld: Symbol not found: _XmlParseXmlDeclNS
Referenced from: /usr/local/apache2/lib/libexpat.0.dylib
Expected in: flat namespace
I tried to search the apaceh mailing list but no luck so far.
January 16th, 2007 at 6:49 pm
Followed your instructions - thanks for the great tips. When I enter /Library/Apache2/bin/apachectl start, I get the following output:
httpd: Could not reliably determine the server’s fully qualified domain name, using Brainiac.local for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
January 16th, 2007 at 7:27 pm
You have to start the server with
sudo /your/path/to/apache2/bin/./apachectl start
After you have entered your admin password, the server should start.
The second error
httpd: Could not reliably determine the server’s fully qualified domain name, using Brainiac.local for ServerName
Is a non serious one, just leave it that way, there’s no problem. If you want to get rid of the warning you can add
ServerName localhost:80 (or whatever port you apache is listening)
inside the httpd.conf and the error message wont be displayed again.
January 16th, 2007 at 7:32 pm
As for my problem, maybe Nicolay did the same mistake i did. I installed the apache server with
configure –enable-mods-shared=all
and got the same error as he had. Normally, and as stated in the apache docs, the built automatically enables the mod_so module and compiles it statically for the server so the server is able to handle DynmaicSharedObjects (aka .so modules) in the first place. So i did not enable this flag specifically.
Turns out, if i do, the apache get’s built with shared modules AND runs.
configure –enable-mods-shared=all –enable-so
did the trick for me.
January 18th, 2007 at 1:37 pm
Hi guys,
I’m running PPC OS X 10.4.8 with Xcode Dev Tools 2.4.1.
I’m using the following config command from poppypsycho’s post, as the original didn’t work for me:
CFLAGS=”-arch ppc -O2″ \
sudo ./configure –enable-layout=Apache \
–prefix=/usr/local/apache2 \
–mandir=/usr/share/man \
–enable-layout=Apache \
–enable-so \
–disable-unique-id \
–enable-asis \
–enable-logio \
–enable-rewrite \
–enable-speling \
–enable-setenvif \
–enable-cgi \
–enable-cgid \
–enable-dav \
–enable-proxy \
–with-z=/usr \
–enable-cache \
–enable-mem_cache \
–enable-ssl=/usr \
–enable-mods-shared=all \
–enable-mime_magic \
–enable-negotiation \
–enable-deflate \
–enable-suexec \
–with-suexec-uidmin=70 \
–with-suexec-gidmin=70 \
–with-suexec-safepath=/bin:/usr/bin:/usr/local/bin \
–with-ldap \
–enable-auth-ldap \
–disable-static \
–enable-shared=max \
–with-mpm=prefork
this configures, makes and installs apache but fails to successfully create the modules. instead of .so files i am left with .la and .a files for each (I assume these are source files built for the creaton of the .so files)
For every module a warning occurs along these lines:
“/usr/local/src/httpd-2.2.3/srclib/apr/libtool –silent –mode=install cp mod_authn_file.la /usr/local/apache2/modules/
Warning! dlname not found in /usr/local/apache2/modules/mod_authn_file.la.
Assuming installing a .so rather than a libtool archive.”
As far as I can tell from the little that exists on google for this, it seems it may be a fault in the version of libtool that I have. Any idea how I can successfully install?
Any help would be greatly appreciated!
Thanks
R
January 18th, 2007 at 3:21 pm
after a bit more research this seems very relevant:
http://mailman1.u.washington.edu/pipermail/pubcookie-users/2006-March/001285.html
but i’ve not managed to get any of the solutions suggested to work.
January 18th, 2007 at 4:21 pm
Turns out I was getting muddled between config options and the version of apache i was installing!
Latest version of Apache works with Richards install instructions.
Too many different tutorials open in my browser I reckon
Thanks for you help Richard!
January 19th, 2007 at 9:03 pm
Has anyone had any success compiling mod_cband http://cband.linux.pl/ for this environment?
make fails with
apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
/Library/Apache2/build/libtool –silent –mode=compile gcc -prefer-pic -arch i386 -DAP_HAVE_DESIGNATED_INITIALIZER -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/Library/Apache2/include -I/Library/Apache2/include -I/Library/Apache2/include -I/usr/include -Wall -DDST_CLASS=3 -c -o src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo
In file included from src/mod_cband.c:61:
src/mod_cband.h:75: error: redefinition of ‘union semun’
src/mod_cband.c:81: warning: type qualifiers ignored on function return type
apxs:Error: Command failed with rc=65536
.
make: *** [src/.libs/mod_cband.so] Error 1
January 31st, 2007 at 6:07 am
Well, I stumbled across your fine site a bit late in the game… after trying MAMP and one-click installs, etc. I found that I really needed the flexibility and experience of making my development server myself. Plus I completely nuked my Apache and PHP installations and have to start from scratch anyway.
Anyway, thing is peachy until I try and start-up my new server:
httpd: Syntax error on line 54 of /Library/Apache2/conf/httpd.conf: Cannot load /Library/Apache2/modules/mod_authn_file.so into server: cannot create object file image or add library
I’ve tried reinstalling a few times, finally deciding that this configuration was what I’m after:
CFLAGS=”-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk” \
./configure –enable-layout=Richard5 \
–enable-mods-shared=all \
–with-ssl=/usr \
–with-mpm=prefork \
–enable-ssl \
–enable-dav \
–enable-cache \
–enable-proxy \
–enable-shared \
–disable-static \
–disable-unique-id \
–disable-ipv6 \
–enable-logio \
–enable-deflate \
–with-ldap \
–with-ldap-include=/usr/include \
–with-ldap-lib=/usr/lib \
–with-included-apr \
–enable-ldap \
–enable-auth-ldap \
–enable-cgi \
–enable-cgid \
–enable-ssl \
–enable-so \
–enable-suexec \
Help a brother out anyone?
Much obliged.
February 1st, 2007 at 7:09 pm
Well, I’ve utterly hooped things on my machine. Anyone have instructions on how to return to the built-in Apache and PHP from OS X 1.4.8? Thanks.
February 10th, 2007 at 3:11 pm
Using Xcode 2.4.1 and Apache 2.2.4. Make fails with these errors:
network_io/unix/sendrecv.c: In function ‘apr_socket_send’:
network_io/unix/sendrecv.c:68: error: nested functions are disabled, use -fnested-functions to re-enable
network_io/unix/sendrecv.c:112: error: nested functions are disabled, use -fnested-functions to re-enable
network_io/unix/sendrecv.c:146: error: nested functions are disabled, use -fnested-functions to re-enable
network_io/unix/sendrecv.c:182: error: nested functions are disabled, use -fnested-functions to re-enable
network_io/unix/sendrecv.c:229: error: parse error at end of input
make[3]: *** [network_io/unix/sendrecv.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
What’s the charm to a successful build?
Thanx,
Chuck
Richard5: Chuck had a problem with a troublesome Stuffit which garbled his source directory. Trying it using tar made it all work again !
March 2nd, 2007 at 7:46 am
I’m having trouble building Apache 2.2.4.
After executing the CFLAGS command as shown on this page, I encountered the following error and don’t know how to recover:
/var/tmp//ccx4Wa4H.s:unknown:FATAL:can’t create output file: .libs/modules.lo
March 2nd, 2007 at 8:10 am
Whoops, had the wrong build there! The latest version works flawlessly. Thanks!
March 15th, 2007 at 9:40 am
used darwin ports to install apache2 and php5 with apache2 and mysql5. all ports are installed just fine and php5 runs fine from the terminal and if i comment out the load madule libphph5.so line from httpd.conf file, apache starts up just fine. but when i try to start up apache with php5 included, i get the following error.
bin/apachectl: line 102: 5067 Trace/BPT trap $HTTPD -k $ARGV
i have looked everywhere and tried everything i can think of and i cant figure it out, any help????
Richard5: I’ve never used darwinports so I don’t know how the modules are compiled, it looks like php is compiled incorrectly. I think you’re better of asking this question on the darwinports forums/mailinglists.
March 17th, 2007 at 4:49 am
Hi. Thx for the guide! I have followed the instructions and can start Apache2 manually using apachectl (and sudo), but things aren’t starting automatically. I have verified that StartupItems is configured as specified above and that my hostconfig is correct. Is there perhaps some permissions issue (since sudo is required to manually start)? Thanks!
March 24th, 2007 at 6:06 pm
For those of you experiencing crashes on launching Apache, I recommend looking at:
/Library/Logs/CrashReporter/httpd.crash.log
If you follow the stack trace, you may find the name of a module. If you see one, then that is likely the culprit and you should comment it out in your httpd.conf file. If it is one that you need then I would recommend reporting this. For example, my Apache was crashing, producing the following:
Thread 0 Crashed:
0 httpd 0×0002da40 compile_regex + 2434 (pcre.c:2463)
1 httpd 0×0002d6a7 compile_regex + 1513 (pcre.c:3666)
2 httpd 0×000300f4 pcre_compile + 696 (pcre.c:5511)
3 httpd 0×000082bc ap_regcomp + 65 (util_pcre.c:135)
4 httpd 0×000051f3 ap_pregcomp + 57 (util.c:268)
5 mod_usertrack.so 0×0058cb18 set_and_comp_regexp + 351 (mod_usertrack.c:203)
6 mod_usertrack.so 0×0058cc38 make_cookie_dir + 91 (mod_usertrack.c:271)
7 httpd 0×0001a33c ap_single_module_configure + 79 (config.c:2048)
8 httpd 0×00028e8c load_module + 969 (mod_so.c:294)
9 httpd 0×00017996 invoke_cmd + 273 (config.c:785)
10 httpd 0×0001849a ap_build_config_sub + 479 (config.c:1436)
11 httpd 0×00018a65 ap_build_config + 141 (config.c:1219)
12 httpd 0×00019230 process_resource_config_nofnmatch + 527 (config.c:1629)
13 httpd 0×00019538 ap_process_resource_config + 302 (config.c:1742)
14 httpd 0×0001a14b ap_read_config + 693 (config.c:2022)
15 httpd 0×000030be main + 1745 (main.c:610)
16 httpd 0×0000245e _start + 228 (crt.c:272)
17 httpd 0×00002379 start + 41
in the left hand column you see ‘mod_usertrack.so’. I commented this out the line:
LoadModule usertrack_module modules/mod_usertrack.so
in my httpd.conf file. My Apache now launches
Hope this is of use.
March 30th, 2007 at 5:10 pm
Hi everyone,
I’ve installed Apache, and it works fine when I start it manually, but it wouldn’t start automatically after I followed all the steps above…
I checked the console, which showed the following errors:
Mar 30 10:58:47 … SystemStarter[279]: The following StartupItems were not attempted due to failure of a required service:
Mar 30 10:59:20 … SystemStarter[45]: The following StartupItems were not attempted due to failure of a required service:
Mar 30 10:59:20 … SystemStarter[45]: /System/Library/StartupItems/Apache
Any ideas greatly appreciated
April 1st, 2007 at 9:02 pm
dyld: Symbol not found: _XmlParseXmlDeclNS
Referenced from: /usr/local/apache2/lib/libexpat.0.dylib
Expected in: flat namespace
/usr/local/apache2/bin/apachectl: line 102: 21991 Trace/BPT trap $HTTPD -k $ARGV
Solution: sudo ln -sf /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libexpat.* /apache2/lib/.
April 22nd, 2007 at 10:28 pm
when itry to install apache 2.2.4 I get this error:
./configure: line 1111: config.log: Permission denied
help
June 23rd, 2007 at 2:11 am
The install seemed to work fine. Then I tried to start Apache using the command:
$ /Library/Apache2/bin/apachectl start
and I got this error message;
httpd: Could not reliably determine the server’s fully qualified domain name, using my-computer.local for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Any idea what went wrong? I’m using an intel mac with os 10.4.7.
Thanks
June 23rd, 2007 at 2:35 am
Arggh. I used the wrong “CFLAGS=…” command. So I dragged the Apache2 folder into the trash, and I started over. Once again everything seemed to install correctly, but I get the same error.
June 26th, 2007 at 10:52 am
I figured out some things.
1) System Preferences>Sharing>Personal Web Sharing should be off.
2) If Personal Web Sharing was off, and I started Apache using the command:
$ sudo /Library/Apache2/bin/apachectl start
Password:
I got what appeared to be a shorter error message:
httpd: Could not reliably determine the server’s fully qualified domain name, using cws-computer.local for ServerName
but when I checked the Activity Monitor(All Processes Page), httpd was running. So that Apache “error” is just a non fatal warning.
3) I tested Apache by typing http://localhost into Safari’s address bar, and a page displayed that said:
It works!
But I wondered whether that page was being served up by my new Apache installation or by my pre-installed Apache. So I changed the permissions on the file:
/Library/Apache2/htdocs/index.html
so that I could freely edit it. Then I edited the text to say, “It works. Apache 2.2.4″, and I saved my changes. Then I typed http://localhost into Safari’s address bar, but the page only displayed:
It works!
It turned out that Safari was caching the original index.html page, and Safari would not display the new index.html page. I figured that out after I clicked on Safari>Empty cache and then typed http://localhost into Safari’s address bar, and it displayed the up to date index.html file:
It works! Apache 2.2.4
4) I tried to fix my initial errors by turning on Personal Web Sharing, but it wouldn’t start–it just said “Web Sharing starting up..”. It turns out that Personal Web Sharing wouldn’t start because my new Apache installation was running. However, the next time I restarted my computer, Personal Web Sharing automatically turned on due to the fact that I had previously tried to start it, and as a result, I got the fatal error message:
httpd: Could not reliably determine the server’s fully qualified domain name, using my-computer.local for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
July 2nd, 2007 at 5:27 am
Hi,
I’m trying to install Apache 2.2.4 onto a G4 eMac running OSX 10.4.9 with 256MB of actual RAM. After issuing the final entry in terminal ( –enable-suexec), I don’t actually get the chance to type in “make”, as the configuration seems to run on its own. Also, after a minute or two of the configurator running, it stops and reports this:
…
checking for shmget… no
checking for shmat… no
checking for shmdt… no
checking for shmctl… no
checking for create_area… no
checking for MAP_ANON in sys/mman.h… yes
checking for /dev/zero… yes
/httpd_2.2.4/srclib/apr/configure:Error: decision on anonymous shared memory allocation method failed
configure failed for srclib/apr
emac:/httpd_2.2.4 twheeler$ make
make: *** No targets specified and no makefile found. Stop.
emac:/httpd_2.2.4 twheeler$
is it possible that I don’t have enough RAM? Otherwise, I can’t figure out what “decision on anonymous shared memory allocation method failed” means.
I previously set up Apache2 on this machine following the earlier “isp-in-a-box” instructions. I currently have Apache 2.0.52 running.
July 12th, 2007 at 11:32 am
Hi!
First of all thx Richard for your post.
I have installed Apache 2.2.4 and it works!
But a I have a problem.
In httpd.conf I use an Alias, like:
Alias /Core “/Users/Ross/Sites/CORE/”
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
The permissions of /Users/Ross/Sites/CORE/ are:
drwxr-xr-x 9 Ross Ross 306 Jul 4 18:06 CORE
When I try to access with http://localhost/Core I have an error 403 Forbidden.
How could I do? I need help with this, I don’t know what to do.
Thx so much.
July 15th, 2007 at 9:28 pm
I get the following errors when compiling:
./configure: line 1: ?: command not found
….
./configure: line 21: ?: command not found
….
configure: error: expected an absolute directory name for –bindir: NONE/bin
configure failed for srclib/apr
Any ideas why the layout isn’t working?
July 15th, 2007 at 10:45 pm
Jason used tabs instead of spaces in his layout file which caused the error…
July 18th, 2007 at 6:32 pm
Thank you for the excellent tutorial. I badly needed this since I am switching from PowerPC to Intel Mac. Your procedure seems quite clear, but on attempting the “make” step on my brand new MacBook (with Developer Tools installed), I get the following errors. Any suggestions? Thanks.
Making all in srclib
Making all in apr
/bin/sh /Users/gipsons/Desktop/httpd-2.2.4/srclib/apr/libtool –silent –mode=compile cc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -traditional-cpp -I./include -I/Users/gipsons/Desktop/httpd-2.2.4/srclib/apr/include/arch/unix -I./include/arch/unix -I/Users/gipsons/Desktop/httpd-2.2.4/srclib/apr/include -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
In file included from ./include/apr_allocator.h:136,
from ./include/apr_pools.h:175,
from /Users/gipsons/Desktop/httpd-2.2.4/srclib/apr/include/arch/unix/../apr_private_common.h:26,
from /Users/gipsons/Desktop/httpd-2.2.4/srclib/apr/include/arch/unix/apr_private.h:781,
from passwd/apr_getpass.c:24:
./include/apr_thread_mutex.h:100: error: stray ‘##’ in program
./include/apr_thread_mutex.h:100: error: parse error before ‘thread_mutex’
./include/apr_thread_mutex.h:100: error: stray ‘##’ in program
./include/apr_thread_mutex.h:100: error: stray ‘##’ in program
./include/apr_thread_mutex.h:100: error: parse error before ‘thread_mutex’
./include/apr_thread_mutex.h:100: error: stray ‘##’ in program
./include/apr_thread_mutex.h:100: error: stray ‘##’ in program
./include/apr_thread_mutex.h:100: warning: data definition has no type or storage class
make[3]: *** [passwd/apr_getpass.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
July 20th, 2007 at 11:39 pm
Well, I give up. I have tried many different things on three different Macs with httpd 2.0.59, 2.2.3, and 2.2.4 and always get the same result. I think it may have something to do with an updated openssl on OS X, but I am not expert enough to be sure. I am probably just doing, or not doing, something stupid/simple. My solution has been to visit Marc Liyanage’s web site where he has kindly posted a link to a compiled universal binary of Apache httpd 2.2.3. It works. And by the way, his configuration parameters give me the same result as Richard’s. Here is the link to the Entropy site:
http://www.entropy.ch/blog/2006/05/12/Universal-Binary-Apache-2-configure-Line.html
July 21st, 2007 at 8:30 am
Steve, the problem looks like it has to do with your machine and perhaps as you indicate a self compiled SSL library. If you’ve got the chance try it again on a fresh installed OS. Or if you don’t need SSL, leave it out.
August 1st, 2007 at 5:52 am
Anytime I edit the layout file or conf file I get one of 2 things: A) I cannot save the file or B) I save the file and apache stops working. Perhaps I need a different editor?
August 19th, 2007 at 2:23 am
This was very helpful. Thanks!
August 24th, 2007 at 2:33 pm
I had the same problem (or similar) to steve above… removing the ssl worked a treat - who needs it anyway right.
now however i get the following error when running make
/apr/libapr-1.la -lpthread
/usr/bin/ld: Undefined symbols:
_ap_mpm_pod_check
_ap_mpm_pod_close
_ap_mpm_pod_killpg
_ap_mpm_pod_open
_ap_mpm_pod_signal
_apr_ldap_get_option
_apr_ldap_info
_apr_ldap_init
_apr_ldap_is_ldap_url
_apr_ldap_is_ldapi_url
_apr_ldap_is_ldaps_url
_apr_ldap_set_option
_apr_ldap_ssl_deinit
_apr_ldap_ssl_init
_apr_ldap_url_parse
_apr_ldap_url_parse_ext
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
i’m using the Apache layout on an intel mac (trying to)install httpd-2.2.4
ideas would be greatly appreciated.
August 25th, 2007 at 4:39 pm
Julian, your mail address doesn’t work so I can’t contact you for any help !
September 22nd, 2007 at 4:34 pm
I get a similar error to Julian’s quoted earlier.
I would be greatful for any suggestions. Thanks
September 22nd, 2007 at 4:39 pm
Almost forgot… This is the error I get:
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_apr_ldap_get_option
_apr_ldap_info
_apr_ldap_init
_apr_ldap_is_ldap_url
_apr_ldap_is_ldapi_url
_apr_ldap_is_ldaps_url
_apr_ldap_set_option
_apr_ldap_ssl_deinit
_apr_ldap_ssl_init
_apr_ldap_url_parse
_apr_ldap_url_parse_ext
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make: *** [all-recursive] Error 1
September 22nd, 2007 at 8:55 pm
Try using the ./configure statement without the following options:
–with-ldap \
–with-ldap-include=/usr/include \
–with-ldap-lib=/usr/lib \
if you ain’t going to use the build in ldap and let me know what happens.
October 2nd, 2007 at 9:37 pm
hello.
I sure hope someone has a clue as to what isn’t working for me here. I have tried 3 separate installs of Apache 2 and then in the end just tried to use the default apache installation that comes with the MacBook Pro (intel). They all have the same symptoms.
Specifically, when I am done installing, everything works great except the show-stopping problem that I can’t serve up ANYTHING but localhost. So, for instance, I complete the installation as Richard5 so generously provides here without incident. Everything appears to compile without error and I am able to bring up Apache2. I edit my httpd-vhosts.conf file to add localhost, which seems to work fine. I add ANY OTHER virtual host to httpd-vhosts.conf, add the appropriate entry to NetInfo Manager, restart Apache and when I try to bring it up in the browser, I get localhost.
That is, it serves up the localhost directory. It’s defaulting for some unknown reason. I have quadruple checked everything. Paths are correct, apache seems to work fine.
After trying Richard’s installation here and getting this error, I installed XAMP’s package for Apache2. It installed without error, but no matter what I do, I can only serve up what’s in the locahost (Document Root) directory.
Since the error seems to have to do with the vhost routing I suspected something wasn’t right with NetInfo Manager. So I tried an entry in /etc/hosts. No luck. I am at the end of my troubleshooting abilities.
Anyone have any idea what I can try? Thanks..
John
October 4th, 2007 at 6:39 pm
Hi. I’ve completed successful installations by these instructions previously. But I’m having problems with this latest attempt. I’m hoping to find someone who can clue me in the right direction to solve it, be that Richard or not.
New Intel iMac running 10.4.10. Developer tools are installated.
When I try to execute the “CFLAGS …” command in Richard’s instructions (for an Intel machine), I get the following error:
checking for chosen layout… Richard5
checking for working mkdir -p… yes
checking build system type… i386-apple-darwin8.10.3
checking host system type… i386-apple-darwin8.10.3
checking target system type… i386-apple-darwin8.10.3
Configuring Apache Portable Runtime library …
configuring package in srclib/apr now
configure: error: expected an absolute directory name for –bindir: NONE/bin
configure failed for srclib/apr
Above (51 & 52) shows someone who was getting the same problems. I tried the fix suggested by Richard’s response (I DLed the config.layout above, rather than just editing the one that came in the archive of source code, and made sure to convert the spaces to tabs). But as you can see, while I am not getting the lines 1-21 part of the errors, I am still getting the APR error.
As stated, any help would be appreciated.
October 4th, 2007 at 7:45 pm
Richard gently pointed out that I had not uncommented my include directive to the vhosts file:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
uncomment the last line:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
As bugs bunny would say, “what a maroon”. Everything works now.
November 17th, 2007 at 9:08 am
Hi there,
I just moved from XP to the new Leopard and spent the entire afternoon-evening trying to install Apache, of course without any success. I have tried almost every single configuration that I have found here and the only thing that I have discovered is that I don’t have cc or gcc or anything else… my machine is totally empty.
This is my Layout:
prefix: /Library/Apache2
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/bin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/modules
mandir: ${prefix}/man
sysconfdir: ${prefix}/conf
datadir: ${prefix}
installbuilddir: ${datadir}/build
errordir: ${datadir}/error
iconsdir: ${datadir}/icons
htdocsdir: ${datadir}/htdocs
manualdir: ${datadir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${prefix}/include
localstatedir: ${prefix}
runtimedir: ${localstatedir}/logs
logfiledir: ${localstatedir}/logs
proxycachedir: ${localstatedir}/proxy
And here is my config and my error:
$ CFLAGS=”-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk” \> ./configure –enable-layout=Alberto \> –enable-mods-shared=all \> –with-ssl=/usr \> –with-mpm=prefork \> –enable-ssl \> –enable-dav \
> > –enable-cache \
> > –enable-proxy \
> > –enable-shared \
> > –disable-static \
> > –disable-unique-id \
> > –disable-ipv6 \
> > –enable-logio \
> > –enable-deflate \
> > –with-ldap \
> > –with-ldap-include=/usr/include \
> > –with-ldap-lib=/usr/lib \
> > –with-included-apr \
> > –enable-ldap \
> > –enable-auth-ldap \
> > –enable-cgi \
> > –enable-cgid \
> > –enable-suexec
-bash: –with-ldap-include=/usr/include: No such file or directory
d142-179-120-244:httpd-2.2.6 alberto$ ./config.pld: line 2:
-bash: ./config.pld:: No such file or directory
d142-179-120-244:httpd-2.2.6 alberto$ # Classical Apache path layout.: command not found
d142-179-120-244:httpd-2.2.6 alberto$ ./config.pld: line 23: unexpected EOF while looking for matching `”
> ./config.pld: line 24: syntax error: unexpected end of file
> checking for chosen layout… Alberto
> checking for working mkdir -p… yes
> checking build system type… i386-apple-darwin9.0.0
> checking host system type… i386-apple-darwin9.0.0
> checking target system type… i386-apple-darwin9.0.0
>
> Configuring Apache Portable Runtime library …
>
> configuring package in srclib/apr now
> configure: error: expected an absolute directory name for –bindir: NONE/bin
> configure failed for srclib/apr
Please some help with this, still I have to install PHP, MySQL, etc…
November 17th, 2007 at 9:21 am
Please install the XCode developer tools from the Leopard installation DVD to get gcc and other tools.
For the different Leopard setup look at this post and read the last comments: http://diymacserver.com/installing-apache/compiling-apache/
November 17th, 2007 at 9:30 am
Man, you are right there behind the computer. Thanks for such a fast reply
November 17th, 2007 at 10:19 am
No luck for me today Richard, I just left a comment in the other blog with my error. Anyway thank you very much for your help
November 29th, 2007 at 3:27 am
I need some help…..Im new on Macs. I did what you said , I added the lines in the config_layout file, then went into terminal and dropped the lines that seemed to do something, it said it was checking a bunch of things and then I typed in “make” but it says “No targets specified and no makefile found. Stop.” . I do see a makefile in the dir. Then I went ahead and typed “sudo make install” and it says “nothing to be done for install” . Any help would be greatly appreciated. Thanks
November 29th, 2007 at 4:19 am
problem with ./configure here is part of the output
configuring package in srclib/apr now
checking build system type… i386-apple-darwin8.11.1
checking host system type… i386-apple-darwin8.11.1
checking target system type… i386-apple-darwin8.11.1
Configuring APR library
Platform: i386-apple-darwin8.11.1
checking for working mkdir -p… yes
APR Version: 1.2.11
checking for chosen layout… apr
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: no acceptable C compiler found in $PATH
configure failed for srclib/apr
November 29th, 2007 at 4:23 am
doooh the developer tools, help to read the posts above
November 29th, 2007 at 8:29 am
@Toby, please make sure that everything you copied had the same results. I mean, sometimes the copy and paste action doesn’t copy as it should.
@Alan, thanks for letting us know you found it out yourself.
March 27th, 2008 at 10:59 pm
I’ve been going along smoothly for over a year now. I’ve followed the above directions on a couple different systems. Today I’ve run into a problem, it’s not so much so with the installation, but today when I fired up apache and went to work on an application apache is not serving from the installed path that I’ve been using for the last year. It is now using the Webserver/documents that is part of the native OS X. I’m on 10.4.11. I didn’t have this problem last week, it looks like there was a security update on 3/23, could this have confused it?
I checked the conf file and my virtual hosts are all there along with the path to the default htdocs. All the easy stuff I think, but don’t see anything that would have changed.
Any insights would be appreciated.
March 27th, 2008 at 11:07 pm
Mike, can you check that you start the same binary version of Apache as before ? Maybe you are starting the default apache version that comes with Mac OSX ?
March 27th, 2008 at 11:12 pm
Richard, I thought of that as well, as I have my set up to use the Control Panel Web Server start. So I specifically started from the Terminal but it’s still pulling up the index file from the default apache version.
March 28th, 2008 at 12:17 am
Find all apachectl programs on your hard disk and see what they use for configuration. The usage depends on the version of apache:
- apachectl -V
- apachectl configtest
It should tell you where it finds the config file.
If all use the incorrect file I think you need to recompile.
April 30th, 2008 at 4:56 pm
configuring package in srclib/apr now
checking build system type… i386-apple-darwin8.11.1
checking host system type… i386-apple-darwin8.11.1
checking target system type… i386-apple-darwin8.11.1
Configuring APR library
Platform: i386-apple-darwin8.11.1
checking for working mkdir -p… yes
APR Version: 1.2.11
checking for chosen layout… apr
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: no acceptable C compiler found in $PATH
configure failed for srclib/apr
I get this exact same error, which is what Alan got but I’m unsure of how he managed to solve it. He mentioned the developer tools?
April 30th, 2008 at 4:59 pm
Yeah… realise what he meant now. I really need to wake up.
April 30th, 2008 at 5:43 pm
Doesn’t matter, still you need to install the X Code tools.