
Web Server on Mac
If you are a devoloper and especially for web, then it could be very comfortable to have a local installed Webserver, primarily Apache2.
With a Mac it is absolutely no big deal, because you just go to the Preferences. In the Internet pane you will find a icon named Sharing and within there you can find some sharing services which can be activated by a single click.
For the web service, just enable “Web Sharing”. Right next to it you will get told, how this webserver is available. It shows you the URL which you can use and give away. It does contain your current IP address, so that people within and outside your network may see it. You may disable that in the firewall and just use “localhost” or its pendant IP 127.0.0.1.
Perl, PHP, mySQL and some more things are commonly used for web developing are already included and do work immediately.
If you are a perl programmer you will be familar with the shebang line, which normally points to the perl compiler commonly located on unix-like systems at /usr/bin/perl.
When using Windows, it is a good choice to use xampp, because it includes all those things in one package which is already preconfigured on a Mac.
But on Windows you although have to do some tricky things, because it has a completely different file structure. If your shebang does not point to the exact path of the perl compiler you will certainly receive a nasty and unwanted “Couldn’t create child process: 720003: script.pl”.
Let us say, you have already an Apache2 running, then open its httpd.conf. Locate the line with “ScriptInterpreterSource registry”. If there is a “#” before it, then remove it! Next, locate any perl script on your system. Actually doubleclick it and link the extension to be always opened with “c:/xampp/perl/bin/perl.exe” or wherever your perl is installed. Reboot, and any script should be able to run without changing the shebang line.
Hello, just wanted to tell you, I liked this article. It was funny. Keep on posting!
Pingback: Markus Zeller Blog » Suspected Malware Site