开发者

How to configure MAMP to serve perl CGI scripts (NOT localhost!)

I'm using MAMP-pro to serve my domain to the outside world.

I'm not a very experienced sys-admin, though I've slogged my way through a few basic things. I know what apache is, and I can read-m开发者_开发百科ost-of but not generate-without-guide related .conf files.

I've got a perl script which I've tested from the command line and it works (outputs as desired.)

When I try to access said script from the browser, I get 404.

I've tried placing the script at:

  • /Users/me/Sites/mydomain.com/htdocs/mycgi.pl
  • /Users/me/Sites/mydomain.com/cgi-bin/mycgi.pl
  • /Users/me/Sites/mydomain.com/htdocs/cgi-bin/mycgi.pl

and accessing it as:

  • http://www.mydomain.com/mycgi.pl
  • http://www.mydomain.com/cgi-bin/mycgi.pl

and all the various combinations, all to no avail (404.)

The script and its container directory have permissions 755.

So, what other steps am I missing? Are there any good set-up guides? I tried the MAMP-Pro manual, but it is filled with such information as "the cancel button cancels the current operation" and not really anything useful. Google turned up several hits that all seem to talk about how to make this work on localhost, but I'm trying to serve this to the outside world.

Any hints?

Thanks!


The official online documentation has a section on virtual hosts. When creating a host for www.mydomain.com you can choose the DocumentRoot which is called "Disk location" within MAMP PRO. If you still get a 404 error, take a look into the error_log for a more specific reason (i.e., where Apache tries to find the file in question).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜