You are here: Home → Forum Home → The Mac Observer Forums → Design & Create → Thread
Perl, Apache & X
-
Since OS X has a Unix base, can someone offer some suggestions on how to configure httpd@localhost so that a web developer could pretest cgi off-line? Mostly I am thinking along the lines of the canned scripts many ISPs provide, in the context of a dial-up connection or perhaps an off-site webmaster.
Signature
Seemed like a good idea at the time
-
Hmmm… I run WebTen under Mac OS 9.2 (which is Apache running in a Unix virtual machine). My one and only non-_default_ VirtualHost in httpd.conf looks like this:
<VirtualHost 0.0.0.0:80>
ServerName cheese.bubba.org
DocumentRoot /usr/local/etc/httpd/WebSites/cheese.bubba.org
Options Indexes FollowSymLinks IncludesNoExec
ServerAlias 127.0.0.1 localhost localhost.bubba.org
ServerPath /cheese.bubba.org
DirectoryIndex index.html
</VirtualHost>(needless to say, the domain names are bogus
)When I do development running locally, I just hit http://localhost (or the alias of http://127.0.0.1). I would imagine you could track down httpd.conf on OS X’s install of Apache and make the appropriate edits. I’ll pass this off to someone with more OS X experience for directory specifics.

-
Weeellll, I could explain it, but if you head on over to the O’Reilly website you can check all these cool goodies out at the Mac section. Part 2 of the Apache tute series is probably where you want to start.
The long and the short of it is that you should first start ‘Web Sharing’ in your preferences, so then you can actually do stuff. If you’re just doing this from home you might not even need to set up a virtual host, so the default install is pretty much ready to go after the odd tweak. Then configure httpd.conf so that it is aliasing to the appropriate folders for DocumentRoot (/Library/WebServer/Documents by default) and CGI script folder (/Library/WebServer/CGI-Executables). httpd.conf lives in /etc/httpd/httpd.conf, is very well documented, and so on, and so forth.
Then, obviously, you chmod your files for execution. This is the thing I always forget.

<font size=-1>[ This Message was edited by: Raena on 2002-01-23 08:33 ]</font>
Signature
Evil® takes many forms. Please submit them promptly, in triplicate.

