Previous 1 2 Next 22 Replies Latest reply: Feb 25, 2013 12:42 PM by 7stud
7stud Level 1 (25 points)



I'm trying to install Apache web server on Mac OSX 10.6.8. On my first attempt with ./configure, I was informed that my apr version was too old. So I downloaded apr and apr-util, and as instructed by the Apache INSTALL doc, I upacked those files and moved their directories to httpd-2.4.3/srclib/apr and httpd-2.4.3/srclib/apr-util:


~/Downloads/httpd-2.4.3/srclib$ ls Makefile     apr          apr-util



Then the Apache INSTALL doc said to run configure like this:



~/Downloads/httpd-2.4.3 $ ./configure --with-included-apr



Then I got a new error:


configure: error: pcre-config for libpcre not found. PCRE is required and available from



So I looked at the Apache installation docs here:


which say:


Perl-Compatible Regular Expressions Library (PCRE)
This library is required but not longer bundled with httpd. Download the source code from, or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the --with-pcre parameter. On some platforms, you may have to install the corresponding -dev package to allow httpd to build against your installed copy of PCRE.



So I downloaded pcre and installed pcre with ./configure, make, make install, which seemed to install pcre correctly. But when I tried to run ./configure for Apache, Apache still couldn't find pcre. So next I tried:



~/Downloads/httpd-2.4.3$ ./configure --with-included-apr --with-pcre=../pcre-8.32/pcre-config



and this time ./configure seemed to end normally.


On to make:


~/Downloads/httpd-2.4.3$  make



But make ends with pcre errors:



Downloads/httpd-2.4.3/modules/cache -I/Users/7stud/Downloads/httpd-2.4.3/modules/core -I/Users/7stud/Downloads/httpd-2.4.3/modules/database -I/Users/7stud/Downloads/httpd-2.4.3/modules/filters -I/Users/7stud/Downloads/httpd-2.4.3/modules/ldap -I/Users/7stud/Downloads/httpd-2.4.3/modules/loggers -I/Users/7stud/Downloads/httpd-2.4.3/modules/lua -I/Users/7stud/Downloads/httpd-2.4.3/modules/proxy -I/Users/7stud/Downloads/httpd-2.4.3/modules/session -I/Users/7stud/Downloads/httpd-2.4.3/modules/ssl -I/Users/7stud/Downloads/httpd-2.4.3/modules/test -I/Users/7stud/Downloads/httpd-2.4.3/server -I/Users/7stud/Downloads/httpd-2.4.3/modules/arch/unix -I/Users/7stud/Downloads/httpd-2.4.3/modules/dav/main -I/Users/7stud/Downloads/httpd-2.4.3/modules/generators -I/Users/7stud/Downloads/httpd-2.4.3/modules/mappers  -prefer-non-pic -static -c util_pcre.c && touch util_pcre.lo

util_pcre.c:48:18: error: pcre.h: No such file or directory

util_pcre.c: In function 'ap_regfree':

util_pcre.c:103: error: 'pcre_free' undeclared (first use in this function)

util_pcre.c:103: error: (Each undeclared identifier is reported only once

util_pcre.c:103: error: for each function it appears in.)

util_pcre.c: In function 'ap_regcomp':

util_pcre.c:129: error: 'PCRE_CASELESS' undeclared (first use in this function)

util_pcre.c:131: error: 'PCRE_MULTILINE' undeclared (first use in this function)

util_pcre.c:133: error: 'PCRE_DOTALL' undeclared (first use in this function)

util_pcre.c:136: warning: implicit declaration of function 'pcre_compile'

util_pcre.c:136: warning: assignment makes pointer from integer without a cast

util_pcre.c:142: warning: implicit declaration of function 'pcre_fullinfo'

util_pcre.c:142: error: expected ')' before 'pcre'

util_pcre.c:142: warning: type defaults to 'int' in declaration of 'type name'

util_pcre.c:142: warning: cast from pointer to integer of different size

util_pcre.c:143: error: 'PCRE_INFO_CAPTURECOUNT' undeclared (first use in this function)

util_pcre.c: In function 'ap_regexec_len':

util_pcre.c:180: error: 'PCRE_NOTBOL' undeclared (first use in this function)

util_pcre.c:182: error: 'PCRE_NOTEOL' undeclared (first use in this function)

util_pcre.c:198: warning: implicit declaration of function 'pcre_exec'

util_pcre.c:198: error: expected ')' before 'pcre'

util_pcre.c:198: warning: type defaults to 'int' in declaration of 'type name'

util_pcre.c:198: warning: cast from pointer to integer of different size

util_pcre.c:221: error: 'PCRE_ERROR_NOMATCH' undeclared (first use in this function)

util_pcre.c:223: error: 'PCRE_ERROR_NULL' undeclared (first use in this function)

util_pcre.c:225: error: 'PCRE_ERROR_BADOPTION' undeclared (first use in this function)

util_pcre.c:227: error: 'PCRE_ERROR_BADMAGIC' undeclared (first use in this function)

util_pcre.c:229: error: 'PCRE_ERROR_UNKNOWN_NODE' undeclared (first use in this function)

util_pcre.c:231: error: 'PCRE_ERROR_NOMEMORY' undeclared (first use in this function)

make[2]: *** [util_pcre.lo] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all-recursive] Error 1



Any ideas what went wrong or what I should try next? The Apache install web page says:


On some platforms, you may have to install the corresponding -dev package to allow httpd to build against your installed copy of PCRE.


But I can't find any information on where "the corresponding -dev package" can be downloaded.



  • etresoft Level 7 (27,781 points)

    Is there any particular reason why you want to build your own Apache? I can help you avoid it but I can't really help you build it. Building open source software packages is just not something I find enjoyable.

  • 7stud Level 1 (25 points)

    I want to set up apache for local development.  What are my other options?

  • etresoft Level 7 (27,781 points)

    If you are still running 10.6.8, just go to System Preferences > Sharing > Web Sharing > ON


    I wrote some user tips for setting up Apache on Lion and Mountain Lion and setting up MySQL. Much of that won't apply to you with 10.6.8. In Lion, Apple removed the Web Sharing checkbox in System Preferences and changed some of the configuration settings for PHP to be more secure. That slightly complicates getting Apache running locally with MySQL. On 10.6.8 however, you just need to enable PHP and install MySQL.

  • 7stud Level 1 (25 points)

    When I do that, the dialog box says:


    Web Sharing allows users of other computers to view webpages on this computer.


    I certainly don't want that.

  • etresoft Level 7 (27,781 points)

    That is pretty much the purpose of Apache. Unless you are directly connected to the internet, no one will be able to access your server. Anyone on your local network (i.e. the same wireless router as you) will be able to access it. You can adjust your configuration to limit connections from only your local machine's address.

  • 7stud Level 1 (25 points)

    Thanks for your help and suggestions.  I actually figured out what I did wrong installing my own apache.   The default installation directory for pcre is supposed to be /usr/local/bin, but I couldn't find it in there.  So I went back and looked at my Terminal output while installing Apache, and I discovered that when I was installing pcre, I did ./configure, but I forgot to do make, then make install.


    To correct that, I cd'ed into ~/Downloads/pcre-8.32, and then did:





    sudo make install  (I got a permission denied error without sudo)



    Then I cd'ed into ~/Downloads/httpd-2.4.3 and did:



    ./configure --with-included-apr



    ...and that seemed to go well (without having to point to pcre-config).  So I did:






    ...and this time there was no pcre error.  I followed that up with:



    sudo make install



    and everything seemed to install fine.  So I started up apache with:


    sudo /usr/local/apache2/bin/apachectl -k start





    ...and that good ole ever present apache error message greeted me:



    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 7studs-computer.local. Set the 'ServerName' directive globally to suppress this message


    No worries.  I opened a browser and entered http://localhost/ in the address bar, and I was greeted by:


    It works!



    For people that aren't error prone, it is pretty easy to install apache.

  • Frank Caggiano Level 7 (25,715 points)

    So you're now doing exactly what going to System Preferences->Sharing and clicking on Web Sharing would have done this morning!


    You wrote:

    Web Sharing allows users of other computers to view webpages on this computer.


    I certainly don't want that.


    Well that's exactly what you are doing doesn't matter where the httpd comes from.

  • 7stud Level 1 (25 points)

    Then why isn't Web Sharing checked in my System Preferences?

  • Frank Caggiano Level 7 (25,715 points)

    Because you're not using the Apache that came with OS X but you still have an httpd running (if you started the one you compiled)

  • 7stud Level 1 (25 points)

    Now I can't get a cgi script to execute.  Apache is returning the text of the script.  I've tried to follow exactly what the Apache CGI tutorial says here:



    I also followed the directions in the perl cgi script, printenv, that was included with Apache, and Apache returns the text, rather than executing the script.  Here is what the cgi-bin directory looks like:


    /usr/local/apache2/cgi-bin$ ls -al

    total 24

    drwxrwxrwx   5 root   admin   170 Feb 19 19:34 .

    drwxr-xr-x  15 root   admin   510 Feb 19 12:36 ..

    -rwxr-xr-x   1 7stud  admin   138 Feb 19 19:32

    -rwxr-xr-x@  1 7stud  staff   687 Feb 19 19:03 printenv

    -rw-r--r--@  1 7stud  staff  1127 Sep  6  2008 test-cgi


    Here's what the printenv script looks like:

    /usr/local/apache2/cgi-bin$ cat printenv

    #!/usr/bin/env perl




    # To permit this cgi, replace # on the first line above with the

    # appropriate #!/path/to/perl shebang, and set this script executable

    # with chmod 755.


    # Note that it is subject to cross site scripting attacks on MS IE

    # and any other browser which fails to honor RFC2616, so never use

    # it in a live server environment, it is provided only for testing.




    ##  printenv -- demo CGI program which just prints its environment



    use strict;

    use warnings;



    print "Content-type: text/plain; charset=iso-8859-1\n\n";

    foreach my $var (sort(keys(%ENV))) {

        my $val = $ENV{$var};

        $val =~ s|\n|\\n|g;

        $val =~ s|"|\\"|g;

        print "${var}=\"${val}\"\n";




    Here's the url I used in my browser:




    Here is my httpd.conf:



    # This is the main Apache HTTP server configuration file.  It contains the

    # configuration directives that give the server its instructions.

    # See <URL:> for detailed information.

    # In particular, see

    # <URL:>

    # for a discussion of each configuration directive.


    # Do NOT simply read the instructions in here without understanding

    # what they do.  They're here only as hints or reminders.  If you are unsure

    # consult the online docs. You have been warned. 


    # Configuration and logfile names: If the filenames you specify for many

    # of the server's control files begin with "/" (or "drive:/" for Win32), the

    # server will use that explicit path.  If the filenames do *not* begin

    # with "/", the value of ServerRoot is prepended -- so "logs/access_log"

    # with ServerRoot set to "/usr/local/apache2" will be interpreted by the

    # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"

    # will be interpreted as '/logs/access_log'.




    # ServerRoot: The top of the directory tree under which the server's

    # configuration, error, and log files are kept.


    # Do not add a slash at the end of the directory path.  If you point

    # ServerRoot at a non-local disk, be sure to specify a local disk on the

    # Mutex directive, if file-based mutexes are used.  If you wish to share the

    # same ServerRoot for multiple httpd daemons, you will need to change at

    # least PidFile.


    ServerRoot "/usr/local/apache2"




    # Mutex: Allows you to set the mutex mechanism and mutex file directory

    # for individual mutexes, or change the global defaults


    # Uncomment and change the directory if mutexes are file-based and the default

    # mutex file directory is not on a local disk or is not appropriate for some

    # other reason.


    # Mutex default:logs




    # Listen: Allows you to bind Apache to specific IP addresses and/or

    # ports, instead of the default. See also the <VirtualHost>

    # directive.


    # Change this to Listen on specific IP addresses as shown below to

    # prevent Apache from glomming onto all bound IP addresses.



    Listen 8080




    # Dynamic Shared Object (DSO) Support


    # To be able to use the functionality of a module which was built as a DSO you

    # have to place corresponding `LoadModule' lines at this location so the

    # directives contained in it are actually available _before_ they are used.

    # Statically compiled modules (those listed by `httpd -l') do not need

    # to be loaded here.


    # Example:

    # LoadModule foo_module modules/


    LoadModule authn_file_module modules/

    #LoadModule authn_dbm_module modules/

    #LoadModule authn_anon_module modules/

    #LoadModule authn_dbd_module modules/

    #LoadModule authn_socache_module modules/

    LoadModule authn_core_module modules/

    LoadModule authz_host_module modules/

    LoadModule authz_groupfile_module modules/

    LoadModule authz_user_module modules/

    #LoadModule authz_dbm_module modules/

    #LoadModule authz_owner_module modules/

    #LoadModule authz_dbd_module modules/

    LoadModule authz_core_module modules/

    LoadModule access_compat_module modules/

    LoadModule auth_basic_module modules/

    #LoadModule auth_form_module modules/

    #LoadModule auth_digest_module modules/

    #LoadModule allowmethods_module modules/

    #LoadModule file_cache_module modules/

    #LoadModule cache_module modules/

    #LoadModule cache_disk_module modules/

    #LoadModule socache_shmcb_module modules/

    #LoadModule socache_dbm_module modules/

    #LoadModule socache_memcache_module modules/

    #LoadModule dbd_module modules/

    #LoadModule dumpio_module modules/

    #LoadModule buffer_module modules/

    #LoadModule ratelimit_module modules/

    LoadModule reqtimeout_module modules/

    #LoadModule ext_filter_module modules/

    #LoadModule request_module modules/

    #LoadModule include_module modules/

    LoadModule filter_module modules/

    #LoadModule substitute_module modules/

    #LoadModule sed_module modules/

    #LoadModule deflate_module modules/

    LoadModule mime_module modules/

    LoadModule log_config_module modules/

    #LoadModule log_debug_module modules/

    #LoadModule logio_module modules/

    LoadModule env_module modules/

    #LoadModule expires_module modules/

    LoadModule headers_module modules/

    #LoadModule unique_id_module modules/

    LoadModule setenvif_module modules/

    LoadModule version_module modules/

    #LoadModule remoteip_module modules/

    #LoadModule proxy_module modules/

    #LoadModule proxy_connect_module modules/

    #LoadModule proxy_ftp_module modules/

    #LoadModule proxy_http_module modules/

    #LoadModule proxy_fcgi_module modules/

    #LoadModule proxy_scgi_module modules/

    #LoadModule proxy_ajp_module modules/

    #LoadModule proxy_balancer_module modules/

    #LoadModule proxy_express_module modules/

    #LoadModule session_module modules/

    #LoadModule session_cookie_module modules/

    #LoadModule session_dbd_module modules/

    #LoadModule slotmem_shm_module modules/

    #LoadModule ssl_module modules/

    #LoadModule lbmethod_byrequests_module modules/

    #LoadModule lbmethod_bytraffic_module modules/

    #LoadModule lbmethod_bybusyness_module modules/

    #LoadModule lbmethod_heartbeat_module modules/

    LoadModule unixd_module modules/

    #LoadModule dav_module modules/

    LoadModule status_module modules/

    LoadModule autoindex_module modules/

    #LoadModule info_module modules/

    #LoadModule cgid_module modules/

    #LoadModule dav_fs_module modules/

    #LoadModule vhost_alias_module modules/

    #LoadModule negotiation_module modules/

    LoadModule dir_module modules/

    #LoadModule actions_module modules/

    #LoadModule speling_module modules/

    #LoadModule userdir_module modules/

    LoadModule alias_module modules/

    #LoadModule rewrite_module modules/



    <IfModule unixd_module>


    # If you wish httpd to run as a different user or group, you must run

    # httpd as root initially and it will switch. 


    # User/Group: The name (or #number) of the user/group to run httpd as.

    # It is usually good practice to create a dedicated user and group for

    # running httpd, as with most system services.


    User daemon

    Group daemon






    # 'Main' server configuration


    # The directives in this section set up the values used by the 'main'

    # server, which responds to any requests that aren't handled by a

    # <VirtualHost> definition.  These values also provide defaults for

    # any <VirtualHost> containers you may define later in the file.


    # All of these directives may appear inside <VirtualHost> containers,

    # in which case these default settings will be overridden for the

    # virtual host being defined.





    # ServerAdmin: Your address, where problems with the server should be

    # e-mailed.  This address appears on some server-generated pages, such

    # as error documents.  e.g.






    # ServerName gives the name and port that the server uses to identify itself.

    # This can often be determined automatically, but we recommend you specify

    # it explicitly to prevent problems during startup.


    # If your host doesn't have a registered DNS name, enter its IP address here.








    # Deny access to the entirety of your server's filesystem. You must

    # explicitly permit access to web content directories in other

    # <Directory> blocks below.


    <Directory />

        AllowOverride none

        Require all denied





    # Note that from this point forward you must specifically allow

    # particular features to be enabled - so if something's not working as

    # you might expect, make sure that you have specifically enabled it

    # below.





    # DocumentRoot: The directory out of which you will serve your

    # documents. By default, all requests are taken from this directory, but

    # symbolic links and aliases may be used to point to other locations.


    DocumentRoot "/usr/local/apache2/htdocs"

    <Directory "/usr/local/apache2/htdocs">


        # Possible values for the Options directive are "None", "All",

        # or any combination of:

        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews


        # Note that "MultiViews" must be named *explicitly* --- "Options All"

        # doesn't give it to you.


        # The Options directive is both complicated and important.  Please see


        # for more information.


        Options Indexes FollowSymLinks




        # AllowOverride controls what directives may be placed in .htaccess files.

        # It can be "All", "None", or any combination of the keywords:

        #   Options FileInfo AuthConfig Limit


        AllowOverride None




        # Controls who can get stuff from this server.


        Require all granted





    # DirectoryIndex: sets the file that Apache will serve if a directory

    # is requested.


    <IfModule dir_module>

        DirectoryIndex index.html





    # The following lines prevent .htaccess and .htpasswd files from being

    # viewed by Web clients.


    <Files ".ht*">

        Require all denied





    # ErrorLog: The location of the error log file.

    # If you do not specify an ErrorLog directive within a <VirtualHost>

    # container, error messages relating to that virtual host will be

    # logged here.  If you *do* define an error logfile for a <VirtualHost>

    # container, that host's errors will be logged there and not here.


    ErrorLog "logs/error_log"




    # LogLevel: Control the number of messages logged to the error_log.

    # Possible values include: debug, info, notice, warn, error, crit,

    # alert, emerg.


    LogLevel warn



    <IfModule log_config_module>


        # The following directives define some format nicknames for use with

        # a CustomLog directive (see below).


        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

        LogFormat "%h %l %u %t \"%r\" %>s %b" common



        <IfModule logio_module>

          # You need to enable mod_logio.c to use %I and %O

          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio





        # The location and format of the access logfile (Common Logfile Format).

        # If you do not define any access logfiles within a <VirtualHost>

        # container, they will be logged here.  Contrariwise, if you *do*

        # define per-<VirtualHost> access logfiles, transactions will be

        # logged therein and *not* in this file.


        CustomLog "logs/access_log" common




        # If you prefer a logfile with access, agent, and referer information

        # (Combined Logfile Format) you can use the following directive.


        #CustomLog "logs/access_log" combined




    <IfModule alias_module>


        # Redirect: Allows you to tell clients about documents that used to

        # exist in your server's namespace, but do not anymore. The client

        # will make a new request for the document at its new location.

        # Example:

        # Redirect permanent /foo




        # Alias: Maps web paths into filesystem paths and is used to

        # access content that does not live under the DocumentRoot.

        # Example:

        # Alias /webpath /full/filesystem/path


        # If you include a trailing / on /webpath then the server will

        # require it to be present in the URL.  You will also likely

        # need to provide a <Directory> section to allow access to

        # the filesystem path.




        # ScriptAlias: This controls which directories contain server scripts.

        # ScriptAliases are essentially the same as Aliases, except that

        # documents in the target directory are treated as applications and

        # run by the server when requested rather than as documents sent to the

        # client.  The same rules about trailing "/" apply to ScriptAlias

        # directives as to Alias.


        ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/






    <IfModule cgid_module>


        # ScriptSock: On threaded servers, designate the path to the UNIX

        # socket used to communicate with the CGI daemon of mod_cgid.


        #Scriptsock cgisock





    # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased

    # CGI directory exists, if you have that configured.




    <Directory "/usr/local/apache2/cgi-bin">

        AllowOverride None

        Options None

        Require all granted




    <IfModule mime_module>


        # TypesConfig points to the file containing the list of mappings from

        # filename extension to MIME-type.


        TypesConfig conf/mime.types




        # AddType allows you to add to or override the MIME configuration

        # file specified in TypesConfig for specific file types.


        #AddType application/x-gzip .tgz


        # AddEncoding allows you to have certain browsers uncompress

        # information on the fly. Note: Not all browsers support this.


        #AddEncoding x-compress .Z

        #AddEncoding x-gzip .gz .tgz


        # If the AddEncoding directives above are commented-out, then you

        # probably should define those extensions to indicate media types:


        AddType application/x-compress .Z

        AddType application/x-gzip .gz .tgz




        # AddHandler allows you to map certain file extensions to "handlers":

        # actions unrelated to filetype. These can be either built into the server

        # or added with the Action directive (see below)


        # To use CGI scripts outside of ScriptAliased directories:

        # (You will also need to add "ExecCGI" to the "Options" directive.)


        #AddHandler cgi-script .cgi



        # For type maps (negotiated resources):

        #AddHandler type-map var




        # Filters allow you to process content before it is sent to the client.


        # To parse .shtml files for server-side includes (SSI):

        # (You will also need to add "Includes" to the "Options" directive.)


        #AddType text/html .shtml

        #AddOutputFilter INCLUDES .shtml





    # The mod_mime_magic module allows the server to use various hints from the

    # contents of the file itself to determine its type.  The MIMEMagicFile

    # directive tells the module where the hint definitions are located.


    #MIMEMagicFile conf/magic




    # Customizable error responses come in three flavors:

    # 1) plain text 2) local redirects 3) external redirects


    # Some examples:

    #ErrorDocument 500 "The server made a boo boo."

    #ErrorDocument 404 /missing.html

    #ErrorDocument 404 "/cgi-bin/"

    #ErrorDocument 402





    # MaxRanges: Maximum number of Ranges in a request before

    # returning the entire resource, or one of the special

    # values 'default', 'none' or 'unlimited'.

    # Default setting is to accept 200 Ranges.

    #MaxRanges unlimited




    # EnableMMAP and EnableSendfile: On systems that support it,

    # memory-mapping or the sendfile syscall may be used to deliver

    # files.  This usually improves server performance, but must

    # be turned off when serving from networked-mounted

    # filesystems or if support for these functions is otherwise

    # broken on your system.

    # Defaults: EnableMMAP On, EnableSendfile Off


    #EnableMMAP off

    #EnableSendfile on



    # Supplemental configuration


    # The configuration files in the conf/extra/ directory can be

    # included to add extra features or to modify the default configuration of

    # the server, or you may simply copy their contents here and change as

    # necessary.



    # Server-pool management (MPM specific)

    #Include conf/extra/httpd-mpm.conf



    # Multi-language error messages

    #Include conf/extra/httpd-multilang-errordoc.conf



    # Fancy directory listings

    #Include conf/extra/httpd-autoindex.conf



    # Language settings

    #Include conf/extra/httpd-languages.conf



    # User home directories

    #Include conf/extra/httpd-userdir.conf



    # Real-time info on requests and configuration

    #Include conf/extra/httpd-info.conf



    # Virtual hosts

    #Include conf/extra/httpd-vhosts.conf



    # Local access to the Apache HTTP Server Manual

    #Include conf/extra/httpd-manual.conf



    # Distributed authoring and versioning (WebDAV)

    #Include conf/extra/httpd-dav.conf



    # Various default settings

    #Include conf/extra/httpd-default.conf



    # Configure mod_proxy_html to understand HTML4/XHTML1

    <IfModule proxy_html_module>

    Include conf/extra/proxy-html.conf




    # Secure (SSL/TLS) connections

    #Include conf/extra/httpd-ssl.conf


    # Note: The following must must be present to support

    #       starting without SSL on platforms with no /dev/random equivalent

    #       but a statically compiled-in mod_ssl.


    <IfModule ssl_module>

    SSLRandomSeed startup builtin

    SSLRandomSeed connect builtin




    # Deal with user agents that deliberately violate open standards


    <IfModule setenvif_module>

    BrowserMatch "MSIE 10.0;" bad_DNT


    <IfModule headers_module>

    RequestHeader unset DNT env=bad_DNT






  • etresoft Level 7 (27,781 points)

    If you check my User Tip above, I have a small portion on how to run Perl CGI scripts from a non-standard directory. However, you seem pretty far away from accomplishing that. I strongly urge you to use the built-in version of Apache instead. It is known to work. You still need to hack that version up if you want to run a Perl script in this fashion. If you still want to try building your own Apache, it sure would be handy to have a known, good version to compare against.

  • 7stud Level 1 (25 points)

    I have a small portion on how to run Perl CGI scripts from a non-standard directory. However, you seem pretty far away from accomplishing that.


    Why do you say that /usr/local/apache2/cgi-bin is non-standard?  It's the default.

  • etresoft Level 7 (27,781 points)

    7stud wrote:


    Why do you say that /usr/local/apache2/cgi-bin is non-standard?  It's the default.

    I saw your username and assumed you were trying from a user directory. While that is "a default" directory based on the configuration in your custom build of Apache, I strongly suggest you start with the built-in build of Apache. The default CGI directory in this case would be "/Library/WebServer/CGI-Executables". These days, most people just use PHP which is configured by default to run from any directory. The information in my User Tip explains how to do that with Perl too. Trying to work out of any system CGI-BIN directory is a hassle.

  • 7stud Level 1 (25 points)

    If I don't solve things with my Apache install, then I will resort to the built in Apache.  At this point though, I'm determined to get my Apache install working.  The Apache install instructions for Mac OSX are quite good--even though I botched one of the steps.


    In addition, the directions for getting CGI working are simplistic.  Have you looked at the Apache instructions for getting CGI working?  You say I am not even close to getting CGI working, but the apache CGI instructions say the only thing you need is a ScriptAlias in your httpd.conf that specifies the path to the cgi-bin directory, AND by default that is already setup for you in httpd.conf.  So the only thing you need to do is make your cgi script executable and add a shebang line to the top.  Simple.  But it doesn't work!

Previous 1 2 Next