Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Snow Leopard Server and personal websites

Snow Leopard Server and personal websites
Thread Tools
sra
Dedicated MacNNer
Join Date: Jun 2001
Location: Asheville, NC, USA
Status: Offline
Reply With Quote
Aug 26, 2011, 04:52 AM
 
How do you enable personal web sites on Snow Leopard Server? I have one machine (a Mac Mini, server version) on which these do not work and another (an XServe) on which they do. I expect to be able to access a user's web site (material in ~user/Sites/) as http://machine.domain/~user/. That works fine on the XServe, and not on the Mac Mini. Both have the Web Server running (and you can access http://machine.domain/ on each). The stubbed in web page (~user/Sites/index.html) says the user should open Sharing in System Preferences, choose web sharing, and enable it. The trouble is that the Sharing tab in System Preferences does not provide "web sharing" as an option -- only things like scanner sharing, printer sharing, remote login, etc. On the other machine, the XServe on which personal websites work, there is also no "web sharing" option in the Sharing tab of System Preferences, but personal websites work nonetheless. I can't find any place in ServerAdmin or ServerPreferences to enable personal websites -- only the option to enable the web server or not. This is very puzzling ... but I'm sure I'm overlooking something obvious, and I hope someone can point it out to me.

Thanks in advance,

--

Steve Anderson
     
niemand0
Fresh-Faced Recruit
Join Date: Sep 2011
Status: Offline
Reply With Quote
Sep 7, 2011, 02:38 PM
 
You need to take several steps, all of which are detailed in various places in Mac OS X Server v10.6 (Snow Leopard Server) Web Technologies Administration:

1) For each user, you need to add a Directory element to a particular location within /etc/apache2/httpd.conf, e.g.,:
Code:
<Directory "/Users/<username>/Sites"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>
where <username> should be substituted with the real user name.
See p. 56, User Content on Websites section

2) ServerAdmin > Web > Settings > Modules: turn on either "userdir_module" or "apple_userdir_module" (only one or the other), and save.
See pp 75-76, Working with Web Modules section

That should get you where a user can use http://<hostname>/~<username> to get to his own website page.

If you want to add a nice touch and rid the need to use the tilde, go to ServerAdmin > Web > Sites > Aliases, and for your default host listed, add a new "Redirect" entry in the URL Aliases and Redirects panel to redirect the pattern "/<username>" to the path "/~<username>".

P.S. The website feature appears to have been broken in 10.7 and 10.7.1 Lion Server. See the reviews for OS X Lion Server in the App Store for more info.
( Last edited by niemand0; Sep 7, 2011 at 10:20 PM. )
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 7, 2011, 03:42 PM
 
To get sites accessible via ~/Sites you'll need to have the user_dir Apache module enabled, as well as a configuration to point to this directory. I'm pretty sure this is the default in OS X Server, but you can always find out what is going on by looking at the Apache configuration in your Terminal.
     
niemand0
Fresh-Faced Recruit
Join Date: Sep 2011
Status: Offline
Reply With Quote
Sep 8, 2011, 03:11 AM
 
I just found that skipping step 1 seems to have no effect (i.e., the personal sites appear to still work).
     
kittonian
Fresh-Faced Recruit
Join Date: Sep 2011
Location: Los Angeles, CA
Status: Offline
Reply With Quote
Sep 8, 2011, 03:30 PM
 
Another great resource for learning Apache is apache.org. There are tons of documents on that website and lots of "how-to" articles. Having a good grasp of Apache is key to understanding the Snow Leopard web server since it is in fact just an Apache install (which btw, is completely free and you can compile it on to any computer you want).
Joshua Aaron
President/CEO
Mac Genius - Apple Macintosh & IT Consulting
http://www.macgenius.com
     
niemand0
Fresh-Faced Recruit
Join Date: Sep 2011
Status: Offline
Reply With Quote
Sep 8, 2011, 05:12 PM
 
Speaking of broken website feature in Lion Server, it appears Apple has taken out many server functionalities in Lion Server:
Apple vanishes MySQL from Mac OS X Lion Server • The Register
https://discussions.apple.com/message/15663982#15663982
Why IT won't like Mac OS X Lion Server | Networking - InfoWorld

Upgrade at your own risk, I suppose.
( Last edited by niemand0; Sep 8, 2011 at 05:55 PM. )
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 8, 2011, 06:02 PM
 
I suggest that you guys look at the utility "homebrew". Homebrew is sort of like Macports, but it doesn't create it's own sandbox or compile from source code. It is designed to supplement the stuff that Apple provides, and integrates its packages with Apple's bits. It would be perfect for installing the missing MySQL, for instance.

Homebrew and Macports both provide an easy way to keep these packages up-to-date. I prefer this substantially over relying on some random person's binary installer on some random site. It is a PITA having several versions of packages littered throughout your system that may confuse and conflict with each other. A package manager like Homebrew or Macports solves this problem.
     
niemand0
Fresh-Faced Recruit
Join Date: Sep 2011
Status: Offline
Reply With Quote
Sep 8, 2011, 07:09 PM
 
Originally Posted by besson3c View Post
I suggest that you guys look at the utility "homebrew"....
How does this help solve the problem that OS X Lion Server is missing so many functionalities? So you can homebrew MySQL, but what about all the other server functions? Besides, homebrew installations are done as if the machine is a single-user machine. A server is multi-user.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 8, 2011, 07:47 PM
 
Originally Posted by niemand0 View Post
How does this help solve the problem that OS X Lion Server is missing so many functionalities? So you can homebrew MySQL, but what about all the other server functions? Besides, homebrew installations are done as if the machine is a single-user machine. A server is multi-user.

What other functionalities are you referring to, specifically?

Regardless of whether the infrastructure is provided by Apple or installed via a package manager or anywhere else, these pieces will be available to all users of the system. I'm not sure what you are referring to here.
     
sra  (op)
Dedicated MacNNer
Join Date: Jun 2001
Location: Asheville, NC, USA
Status: Offline
Reply With Quote
Oct 17, 2011, 04:39 AM
 
Thanks a lot -- I just noticed this reply to my question, and it works fine. I have no interest in "upgrading" to Lion server, so it should go on working for a while...

-- Steve Anderson
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,