Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why is web sharing not in system preferences?

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?

MacBook Pro, OS X Mountain Lion

Posted on Aug 22, 2012 8:49 AM

Reply
Question marked as Best reply

Posted on Aug 22, 2012 9:11 AM

It hss been removed. For most users, there is still quite a bit more to setup. See my user tip for Mountain Lion specific instructions on how to setup a web server: https://discussions.apple.com/docs/DOC-3083

5 replies

Aug 22, 2012 11:08 AM in response to saffronmike

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

Aug 22, 2012 12:15 PM in response to saffronmike

Thanks for your appreciation and glad to help.


I have an update for the PHP part of my reply.


The interactive syntax doesn't work ... my bad.


Put the following content in a text file within your local document root ~/Sites folder. You can call it info.php.


<?php

phpinfo();

?>


Assuming you enabled PHP from my previous post, enter the following in your web browser:


localhost/~yourname/info.php

Aug 22, 2012 12:27 PM in response to VikingOSX

thanks so much for your help...... now to ask something really stupid LOL....

I edited the files per your instructions and Apache is running and I have my username.config file, etc all done.

BUT, when I enter HTTP://<localhost> , Safari indicates it cant find the server. The localhost is the name of my machine, correct? I dont have to include that in any config file, do I?

Why is web sharing not in system preferences?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.