Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Web Sharing is Broken in Lion

I just upgraded to Mac OSX Lion and now I can't access my localhost web server. I use this for development so that is a BIG problem!


How do I get access to the /Library/WebServer/documents folder


What files changed? Can I change them back? Can I just revert to my previous OS?


Any help is greatly appreciated


Mac OS X 10.7

iMac, Mac OS X (10.7)

Posted on Jul 24, 2011 9:25 AM

Reply
6 replies

Jul 24, 2011 2:57 PM in response to derekbanas

I solved the problem using console. You can bring it up by typing Console in Spotlight Search.


Console told me there was a problem with line 111 in my /private/etc/apache2/httpd.conf file when the web server was started up. That line looked like this


#LoadModule php5_module libexec/apache2/libphp5.so


I uncommented and restarted the server and everything works?


I hope that simple fix works for you. Either way if it doesn't use console to find your personal issue

Aug 21, 2011 3:57 AM in response to derekbanas

You are correct in the general approach, i.e. to search for error messages the system gives. In the particular case, being web sharing managed by the apache server the obvious place to examine was in effect its directory /private/etc/apache2 and its configuration file httpd.conf


But beware of generalizing our personal experience: in my particular case, I had to comment both fastcgi and php5 module lines in httpd.conf in order to have web sharing correctly functioning ;-)


This approach works fine also in other situations: the rule-of-thumb is to revert to the ancient Unix times and to work with command line (but this was annoying, and was the reason why I chose Apple instead of Linux :-( ).


By the way, I'm VERY disappointed with Apple: they sell a product (Lion Server) far away from their last and best real server product (Leopard and Snow Leopard Server). Letting alone the tragic decision of discontinuing the glorious server hardware (Xserve family)... I think Apple is at the limit of a fraud to its customers!

Aug 21, 2011 12:40 PM in response to derekbanas

APPLE !!! Listen, Our company are so disapionted in your unproffessionel way you let the "BEAST" (read LION) out on the open market.!!!


We are a Architects and we have a 1 MAC Server, 1 NAS server and a coplke of MAC's and a couple of PC.

And nothing works any more thanks to you. THANK YOU !!!!!!


We have a mess on the firm right now and we have to buy a couple of new PC an we have put the MAC things in the closet.


WAKE UP - start up the SMB protokoll or the MAC stuff are baned in our company for ever.....!!!!!


😠

Aug 21, 2011 12:54 PM in response to derekbanas

Whenever I have problems with the Web service, I revert to the default web configuration per OS X Lion server documentation:


  1. Open Terminal.
  2. Enter the following command:$ sudo serveradmin command web:command=restoreFactorySettings


Then, if necessary, I reconfigure using the Server app. For me, the default settings are fine. After that, I disable and enable Webdav (iOS sharing) under File Sharing for each share to make sure Sharepoint settings work with the new Web service configuration. After doing that, Webdav begins to work.

Aug 21, 2011 8:29 PM in response to Kurite

Well done! And why not to put our head in the sand the next time we'll have a problem with Lion server? 😉

Did you read the previous posts? The problem IS NOT in restoring factory settings (this may work well for the regular desktop Lion - or Mac - user): we are dealing with BIG problems of BIG environments, those who installed Lion Server trusting Apple in a smooth upgrade from Snow Leopard Sever and instead are losing much if the the settings and work done till now to have a server functioning!


Again: if I wanted to joke with the command line and waste my time in reading tons of manuals instead of using a simple and elegant graphic interface/tool (for which Apple is famous and has his fortune) then I'd better to becom a Linux nerd! And don't forget, Mac OS X is simply an open-source Unix project (Darwin) which NO ONE would buy and install if there wasn't all the precious Apple stuff we had (well functioning) till Snow Leopard Server. All this Terminal suggestions remember me the glorious times of A/UX (if you know what it was)...


So, avoid confusion between the desktop (a delicious upgrade to Mac OS X with still some flaws due to its youth) and the Server version of Lion: those managing a Server OS are a totally different kind of persons and those using an Apple Server OS have much more stringent needs!

Sep 18, 2012 6:54 AM in response to Kurite

Do you know if there's a similar command in Mac OS X Lion 10.7.4? not the server version. I'm stuck and can't enable web sharing under system preferences so i can't access my localhost 😟 I actually tried that command and i get a web:error = "CANNOT_LOAD_BUNDLE_ERR" so i don't know what to do.


Message was edited by: ggomezsa

Web Sharing is Broken in Lion

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