Mac OS X Server 5.2 problem setting cgi perl access

El Captain running Mac OS X Server 5.2 virtual hosting, have enabled cgi access under website advanced settings in the Server Admin panel. Have added the cgi-bin in the web with a test cgi script with correct permission set, however I still get "The requested URL /cgi-bin/test.cgi was not found on this server" Httpd conf file has the following for the script alias "ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/Server/Web/Data/CGI-Executables/$1", however there is no folder for CGI-Executables under the path /Library/Server/Web/Data/


An example of how to setup access and enable cgi on Server 5.2 is appreciated.

Xserve3,1-OTHER, OS X El Capitan (10.11.6), OS X Server 5.2

Posted on Apr 21, 2017 3:03 AM

Reply
1 reply

Apr 21, 2017 10:32 AM in response to Harvey Murray

Harvey Murray wrote:


El Captain running Mac OS X Server 5.2 virtual hosting, have enabled cgi access under website advanced settings in the Server Admin panel. Have added the cgi-bin in the web with a test cgi script with correct permission set, however I still get "The requested URL /cgi-bin/test.cgi was not found on this server" Httpd conf file has the following for the script alias "ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/Server/Web/Data/CGI-Executables/$1", however there is no folder for CGI-Executables under the path /Library/Server/Web/Data/


An example of how to setup access and enable cgi on Server 5.2 is appreciated.


Finally, have cgi scripts working with the following problem which is not suitable (using: "ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/Server/Web/Data/CGI-Executables/$1"). Cgi scripts run from the document root and any other folder in the document which contains cgi scripts, however will not run from "cgi-bin" in the document root, but will run from "cgibin". Can someone point me to how to have the cgi scripts only run from a folder called "cgi-bin" in the document root.

Below is the test script from document root:


BW Test version 5.0

Copyright 1995-2008 The BearHeart Group, LLC


Versions:

=================

perl: 5.018002

CGI: 3.63


CGI Values:

=================


Environment Variables:

=================

CONTEXT_DOCUMENT_ROOT [/Library/Server/Web/Data/Sites/www.mydomain.com]

CONTEXT_PREFIX []

DOCUMENT_ROOT [/Library/Server/Web/Data/Sites/www.mydoman.com]

GATEWAY_INTERFACE [CGI/1.1]

HTTP_ACCEPT [text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8]

HTTP_ACCEPT_ENCODING [gzip, deflate, sdch]

HTTP_ACCEPT_LANGUAGE [en-US,en;q=0.8]

HTTP_CONNECTION [Keep-Alive]

HTTP_HOST [mydomain.com]

HTTP_UPGRADE_INSECURE_REQUESTS [1]

HTTP_USER_AGENT [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36]

HTTP_X_FORWARDED_HOST [mydomain.com]

HTTP_X_FORWARDED_PORT [80]

HTTP_X_FORWARDED_PROTO [http]

HTTP_X_FORWARDED_SERVER [www.mydomain.com]

PATH [/usr/bin:/bin:/usr/sbin:/sbin]

QUERY_STRING []

REMOTE_ADDR [68.169.xxx.xxx]

REMOTE_PORT [65104]

REQUEST_METHOD [GET]

REQUEST_SCHEME [http]

REQUEST_URI [/test.cgi]

SCRIPT_FILENAME [/Library/Server/Web/Data/Sites/www.mydomain.com/test.cgi]

SCRIPT_NAME [/test.cgi]

SERVER_ADDR [127.0.0.1]

SERVER_ADMIN [admin@example.com]

SERVER_NAME [mydomain.com]

SERVER_PORT [80]

SERVER_PROTOCOL [HTTP/1.1]

SERVER_SIGNATURE [<address>Apache Server at mydomain.com Port 80</address>

]

SERVER_SOFTWARE [Apache]

VERSIONER_PERL_PREFER_32_BIT [no]

VERSIONER_PERL_VERSION [5.18]

__CF_USER_TEXT_ENCODING [0x46:0:0]


All help is appreciated

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac OS X Server 5.2 problem setting cgi perl access

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.