Tag: MacPorts/apache2
sudo port install apache2
$ cd /opt/local/apache2/conf $ sudo cp httpd.conf.sample httpd.conf
$sudo /opt/local/apache2/bin/apachectl start
$sudo /opt/local/apache2/bin/apachectl stop
$sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
$sudo launchctl unload -w /Library/LaunchDaemons/org.macports.apache2.plist
#!/opt/local/bin/ruby require "cgi" print "Content-type: text/html\n\n" print "<html><body>Hello World</body></html>"