~/Sites and CGI

Posted on 2004-11-29
Last Modified: 2010-03-04

I'm having trouble getting the web server to run my perl CGI scripts on my Powerbook, which is running OS X 10.3.6.

I followed this guide :

When I try to access the CGI, I get a 403 message :

You don't have permission to access /~test/bluewave/tmp2.cgi on this server.

This is the httpd.conf section :

<Directory />
    Options FollowSymLinks
    AllowOverride Options

% cat ~/Sites/.htaccess
Options +ExecCGI

% ls -l ~/Sites/bluewave/tmp2.cgi
-rwxr-xr-x 1 test test 129 30 Nov 12:09 /Users/test/Sites/bluewave/tmp2.cgi

I can access regular html in the bluewave directory, but the CGI won't run.

Any ideas?

Question by:davidmaxwaterman
    LVL 15

    Accepted Solution

    You really should put the +ExecCGI in the httpd.conf section...

    In your virtual host in the httpd.conf , you should have something like:

    <Directory /Users/test/Sites>
    Options FollowSymLinks
    order allow,deny
    allow from all
    <Limit GET POST>
    order allow,deny
    allow from all
    ScriptAlias /cgi-bin/ /Users/test/Sites/
    LVL 51

    Expert Comment

    Options FollowSymLinks +ExecCGI
    LVL 15

    Expert Comment

    ahoffman - yep - thanks for the catch!

    Author Comment

    Just to followup...

    Since this is an Apple OS X specific configuration, I think the fully correct answer is what I was told on Apple's support web site :

    But I am sure that what you put would also have worked :)

    Thanks for your help!

    LVL 15

    Expert Comment

    David -

    Glad to hear that your problem is solved - and thanks for the points!

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now