|
|
Snow Leopard Server and personal websites
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2001
Location: Asheville, NC, USA
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2011
Status:
Offline
|
|
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.
)
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2011
Status:
Offline
|
|
I just found that skipping step 1 seems to have no effect (i.e., the personal sites appear to still work).
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2011
Location: Los Angeles, CA
Status:
Offline
|
|
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).
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2011
Status:
Offline
|
|
(
Last edited by niemand0; Sep 8, 2011 at 05:55 PM.
)
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
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.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2011
Status:
Offline
|
|
Originally Posted by besson3c
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.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by niemand0
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.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jun 2001
Location: Asheville, NC, USA
Status:
Offline
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|