daytoncreative

Q: apache update

Apahce just updated again two days ago, When will Apple update this? It is getting very hard to stay PCI Compliante

when apple seems to be months behinde on there updates, It was never this way a few years ago. Does anyone

have a good step by step instustions on compliing apahce on OSX Server just as apple does.

Mac OS X (10.6.8)

Posted on Feb 2, 2012 10:34 AM

Close

Q: apache update

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by TAHNHS,

    TAHNHS TAHNHS Apr 13, 2012 7:48 AM in response to Martin R. Lerch
    Level 1 (0 points)
    Apr 13, 2012 7:48 AM in response to Martin R. Lerch

    Martin,

     

    1) Rerun configure with --disable-version added to the end of the list of options

    2) Stop apache

    3) make clean

    4) make

    5) make install

    6) Remove comment in httpd.conf from loading of version_module

    7) Start apache

     

    On 10.6.8, /usr/sbin/apachectl appears to be a stock script with no Apple specific knowledge, in particular it doesn't use launchctl to start and stop apache. On 10.7.3, apachectl is Apple specific in that it does use launchctl. You could copy apachectl from 10.7.3 to 10.6.8 and use that or use serveradmin to start and stop apache.

    serveradmin stop web

    serveradmin start web

    serveradmin status web

     

    I've got no info on the shadow.conf files.

     

    Ross

  • by manchinglee,

    manchinglee manchinglee May 25, 2012 7:07 AM in response to TAHNHS
    Level 1 (0 points)
    May 25, 2012 7:07 AM in response to TAHNHS

    Hi TAHNHS,

     

    thx for the info, I am trying to follow your steps and when I got to:

     

    ./configure --enable-layout=Darwin --sysconfdir=/private/etc/apache2 --localstatedir=/private/var --with-suexec-bin=/usr/bin/suexec --disable-authn-file --disable-authn-dbm --disable-authn-anon --disable-authn-dbd --disable-authn-default --disable-authz-host --disable-authz-groupfile --disable-authz-user --disable-authz-dbm --disable-authz-owner --disable-authz-default --disable-auth-basic --disable-include --disable-filter --disable-log-config --disable-env --disable-setenvif --disable-mime --disable-status --disable-autoindex --disable-asis --disable-cgi --disable-negotiation --disable-dir --disable-actions --disable-alias

     

    I got some error message, do you think you can help?

     

    Configuring Apache Portable Runtime Utility library...

     

     

    checking for APR-util... yes

    checking for gcc... gcc

    checking for C compiler default output file name...

    configure: error: in `/httpd-2.2.22':

    configure: error: C compiler cannot create executables

    See `config.log' for more details.

  • by daytoncreative,

    daytoncreative daytoncreative May 25, 2012 9:03 AM in response to manchinglee
    Level 1 (0 points)
    May 25, 2012 9:03 AM in response to manchinglee

    Are you logged in as root?

  • by Martin R. Lerch,

    Martin R. Lerch Martin R. Lerch May 25, 2012 9:31 AM in response to daytoncreative
    Level 1 (54 points)
    iTunes
    May 25, 2012 9:31 AM in response to daytoncreative

    So after talking to Apple Enterprise Support on numerous occasions trying to beat a dead horse. Yes, I was able to update the Apache 2.2.21 to 2.2.22 thanks to this thread, and it all was working great. But, I have not been able to get Server.app to work. It's a shame that Apple went backwards and has the Apache process running constantly. Yes, Apache is running even if you try to shut it down as root with apachectl stop. It will respawn within seconds. You can use Activity Monitor to force quit all httpd processes, and it will stay off, but this has other problems. Anyway, a bunch of other services are relying on Apache running in OS X 10.7.3 / 10.7.4. So the only real way to make changes is inside Server.app. But Server.app is nothing like Server Admin used to be under 10.6. Furthermore if you make any manual changes and additions to your vhost .conf files insidde the sites directory they are all overwritten next time you fiddle with something inside Server.app. It's all a real shame.

     

    A former enterprise class server software up until 10.6 has been demoted into a server that does not work with 10.7. I just hope that 10.8 will bring back the server. The way it is now it is not usable. I sent my mac mini Lion server back for a refund and will wait until Apple fixes these extreme flaws.

     

    Oh yes, I have no problem using Server.app, but it does not give me all the functions needed in order to just use Server.app. No password protected realms, not custom configuration directives.. nothing. It's just way too basic to really work in a production environment. Very sad.

     

    Sincerely,

     

    Martin

  • by manchinglee,

    manchinglee manchinglee May 25, 2012 9:53 AM in response to daytoncreative
    Level 1 (0 points)
    May 25, 2012 9:53 AM in response to daytoncreative

    yes I am logged in as root.

    thx for any help

  • by daytoncreative,

    daytoncreative daytoncreative May 25, 2012 10:00 AM in response to manchinglee
    Level 1 (0 points)
    May 25, 2012 10:00 AM in response to manchinglee

    Is your Xcode up to date? And what does it say in the config.log?

  • by Camelot,

    Camelot Camelot May 25, 2012 10:31 AM in response to Martin R. Lerch
    Level 8 (47,250 points)
    Mac OS X
    May 25, 2012 10:31 AM in response to Martin R. Lerch

    Oh yes, I have no problem using Server.app, but it does not give me all the functions needed in order to just use Server.app. No password protected realms, not custom configuration directives.. nothing. It's just way too basic to really work in a production environment. Very sad.

    I hear what you're saying but to be honest, in my opinion, even Server Admin.app in earlier versions was too-limited and also had a tendency to overwrite your changes (although that did get better in later versions).

     

    Ultimately if you have a high level production web server you're not using Server Admin.app or Server.app, you're hand-crafting your apache configuratiom files, just like on any other platform. No one has a good, comprehensive Apache front-end GUI.

  • by Martin R. Lerch,

    Martin R. Lerch Martin R. Lerch May 25, 2012 10:49 AM in response to Camelot
    Level 1 (54 points)
    iTunes
    May 25, 2012 10:49 AM in response to Camelot

    You now you are correct, and I have no problem hand-crafting my vhost .conf files. But.. and here is the kicker.

     

    I went ahead and added a simple include line in the main httpd.conf file to include all *.conf in a custom_sites directory. I saved the httpd.conf file (the one inside /private/etc/apache2), and stopped and started the web server using Server.app. So this way I had no sites but the default site configured, which is something that can't be edited inside Server.app. And I had all my vhost .conf files inside /private/etc/apache2/custom_sites, with an include directive inside the main httpd.conf file.

     

    Guess what happened - nothing. Wouldn't recognize the vhost files. The sites were not accessible. So I went ahead and restarted apache from the command line using serveradmin stop and serveradmin start (with sudo of course), and I tried sudo apachectl graceful trying to get apache to reload the httpd.conf file. Nothing.. it simply didn't include the vhost .conf files.

     

    Then to my surprise after a while I checked the httpd.conf file, and guess what.. it was replaced and reset to the original without my include directive! That was it for me. I thought if Server.app or serveradmin keeps on rewriting those files then I don't want anything to do with it.

     

    You know, I am a big Apple geek. Have everything Apple at home and at the office. Have been buying their computers and such since 95. Yes, it was not always smooth sailing, but this Lion Server stuff is not at all prime time ready. Sorry.

     

    Martin

  • by manchinglee,

    manchinglee manchinglee May 25, 2012 10:49 AM in response to daytoncreative
    Level 1 (0 points)
    May 25, 2012 10:49 AM in response to daytoncreative

    configure:4698: checking for C compiler version

    configure:4707: gcc --version >&5

    ./configure: line 4709: gcc: command not found

    configure:4718: $? = 127

    configure:4707: gcc -v >&5

    ./configure: line 4709: gcc: command not found

    configure:4718: $? = 127

    configure:4707: gcc -V >&5

    ./configure: line 4709: gcc: command not found

    configure:4718: $? = 127

    configure:4707: gcc -qversion >&5

    ./configure: line 4709: gcc: command not found

    configure:4718: $? = 127

    configure:4740: checking for C compiler default output file name

    configure:4762: gcc    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK   conftest.c  >&5

    ./configure: line 4764: gcc: command not found

    configure:4766: $? = 127

    configure:4803: result:

    configure: failed program was:

    | /* confdefs.h */

    | #define PACKAGE_NAME ""

    | #define PACKAGE_TARNAME ""

    | #define PACKAGE_VERSION ""

    | #define PACKAGE_STRING ""

    | #define PACKAGE_BUGREPORT ""

    | #define PACKAGE_URL ""

    | /* end confdefs.h.  */

    | #include <stdio.h>

    | int

    | main ()

    | {

    | FILE *f = fopen ("conftest.out", "w");

    |  return ferror (f) || fclose (f) != 0;

    |

    |   ;

    |   return 0;

    | }

    configure:4809: error: in `/httpd-2.2.22':

    configure:4813: error: C compiler cannot create executables

    See `config.log' for more details.

  • by Martin R. Lerch,

    Martin R. Lerch Martin R. Lerch May 25, 2012 11:01 AM in response to manchinglee
    Level 1 (54 points)
    iTunes
    May 25, 2012 11:01 AM in response to manchinglee

    Ok, I think this sounds familiar. If you are on OS X 10.7.x please be sure to do the following:

     

     

    1. Download Xcode from App store
    2. Start Xcode.app, go to preference, downloads tab and install command line tools (http://www.macobserver.com/tmo/article/install_the_command_line_c_compilers_in_o s_x_lion/)
    3. download and install m4 (m4-1.4.16.tar.gz) and autoconf (autoconf-2.68.tar.gz) -- great tutorial here (http://www.spiration.co.uk/post/1385/Cannot-find-autoconf.-Please-check-your-aut oconf-installation)

     

    Now if you have done #1 already, that's only half of the job. You need to download, install and enable the commandline tools for Xcode first! See step 2.

     

    You may get a message stating something about autoconf. If that's the case then you need to follow the instructions in step 3.

     

    Give it a whirl.

     

    Martin

  • by manchinglee,

    manchinglee manchinglee May 25, 2012 11:13 AM in response to Martin R. Lerch
    Level 1 (0 points)
    May 25, 2012 11:13 AM in response to Martin R. Lerch

    I am on 10.6.8.  Do I need to do that same?

  • by Martin R. Lerch,

    Martin R. Lerch Martin R. Lerch May 25, 2012 11:31 AM in response to manchinglee
    Level 1 (54 points)
    iTunes
    May 25, 2012 11:31 AM in response to manchinglee

    I don't think so. Xcode for Snow Leopard is different. What version Xcode are you running? Is it 4.0.2?

     

    Regarding 10.6.8. The original instructions were provided for 10.6.8. I personally didn't try it on 10.6.8. I tried it successfully on 10.7.3 (after the February 2012 security update which upgraded Apache to 2.2.21).

     

    So basically the post that I sent earlier would not apply to you. Sorry.

     

    Unfortunately I don't have the time to try it on my 10.6.8 server but TAHNHS in prior posts did it on 10.6.8. He provided the instructions in the first place. Maybe he has some input for your issues?

     

    Martin

  • by TAHNHS,

    TAHNHS TAHNHS May 26, 2012 8:10 AM in response to Martin R. Lerch
    Level 1 (0 points)
    May 26, 2012 8:10 AM in response to Martin R. Lerch

    Martin

     

    It seems that gcc (compiler from Xcode) is either not installed or not on the path.

    Start a terminal window.

    Become root: sudo su

    Enter the command: whereis gcc

    The output should be: /usr/bin/gcc

    In your case the ouput will be probably be nothing.

    Enter the command: ls -l /usr/bin/gcc*

    On my 10.6.8 server /usr/bin/gcc is a symbolic link to /usr/bin/gcc-4.2; is that file present? If so, the symbolic link got lost; enter the command: ln -s /usr/bin/gcc-4.2 /usr/bin/gcc. If you have gcc-4.0, link to that.

    If /usr/bin/gcc-4.x isn't present, I'd (re)install Xcode.

     

    Ross

  • by Martin R. Lerch,

    Martin R. Lerch Martin R. Lerch May 26, 2012 8:57 AM in response to TAHNHS
    Level 1 (54 points)
    iTunes
    May 26, 2012 8:57 AM in response to TAHNHS

    Hello Ross,

     

    Thanks for your reply. I am sure that manchinglee appreciates the input. You were the one who got me on the right track - even though I ended up returning my Lion server! Thanks for your input.

     

    TTYL

     

    Martin

  • by manchinglee,

    manchinglee manchinglee May 26, 2012 1:07 PM in response to Martin R. Lerch
    Level 1 (0 points)
    May 26, 2012 1:07 PM in response to Martin R. Lerch

    yup all working now, just installed xcode again, then no more error and allow me to make and make install.

     

    thanks for all your help!

Previous Page 2 of 3 last Next