saffronmike wrote:
Why is Web Sharing not in Sharing in System Preferences? I'm running Mountain Lion, but don't think that's a problem. I'm trying to install something called STACEY which is a CMS. Instructions for install went fine until I needed to turn web sharing on and it isn't there. Do I need to have a website on my Mac before the web sharing option will appear?
Web sharing remains in Mountain Lion, Apple removed the GUI simplicity of starting/stop by removing the web sharing choice from Sharing preferences. Apple now expects you to use the terminal command line to invoke web sharing! If you want a third-party web-sharing preference that starts/stops web-sharing, you might use this solution. I tried it and it works, but web sharing has to be restarted after a reboot.
During Mountain Lion install, two locations are configured for default web sharing (httpd) services.
Personal use document root
$ ls /etc/apache2/users
You should see a familiar text file as yourname.conf. In this file, the default web sharing document root is ~/Sites, and it contains a default index.html file. You can create subfolders, each with a different enclosed web site. From your browser, you would reference these as:
localhost/~username
localhost/~username/subfolder
Your CMS may have other instructions about what it wants as a default location.
System level document root
$ ls /Library/WebServer/Documents
Referenced in your browser as:
localhost/
localhost/subfolder
Temporary Web Sharing until reboot:
$ sudo apachectl start
You may receive a prompt to enable in-bound firewall connections for httpd. Yes, if you are sharing beyond your computer; no, if you are just using the CMS on your machine.
If you want to stop web sharing:
$ sudo apachectl stop
or if you have made configuration edits:
$ sudo apachectl restart
Web Sharing across reboots
$ sudo launchctl -w /System/Library/LaunchDaemons/org.apache.httpd.plist
or
$ sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
and if your CMS wants PHP enabled in Mountain Lion web-sharing:
$ ls /etc/apache2/httpd.conf
uncomment the following line:
# loadModule php5_module libexec/apache2/libphp5.so
$ sudo apachectl restart
$ php --interactive
php > phpinfo()
php > quit
$
Message was edited by: VikingOSX
Message was edited by: VikingOSX