Setting up a password protected download page on an OS X server

mac-osxpassword-protectedwebsite

I need to setup a password protected download webpage on my OS X server, can anyone link me to some good resources that might help me do this?

Best Answer

By default Mac OS X serves pages using Apache. You can either set up 'Basic' authentication by editing .htaccess by hand or you can do it using Server Admin. Apple uses the term Realm in Server Admin to refer to this.

Doing it by hand see Question 74906 (How Do I password protect an Apache website?)

Server Admin (GUI) Instructions (from the Documentation):

  1. Open Server Admin and connect to the server.
  2. Click the triangle at the left of the server.
  3. The list of services appears. From the expanded Servers list, select Web.
  4. Click Sites, then select the website in the list.
  5. Click Realms below the websites list.
  6. Click the Add (+) button to create a realm. The realm is the part of the website users can access.
  7. In the Realm Name field, enter the realm name. This is the name users see when they log in to the website.
  8. From the Authentication pop-up menu, choose a method of authentication:
    • Basic authentication is on by default. Don’t use basic authentication for sensitive data because it sends your password to the server unencrypted.
    • Digest authentication is more secure than basic authentication because it uses an encrypted hash of your password.
    • Kerberos authentication is the most secure authentication. If you want Kerberos authentication, you must join the server to a Kerberos realm.
  9. Enter the realm location or folder you are restricting access to:
    • Choose Location from the pop-up menu and enter a URL to the location in the website that you want to restrict access to.
    • Choose Folder from the pop-up menu and enter the path to the folder that you want to restrict access to. You can also click the Browse button to locate the folder you want to use.
  10. Click OK.
  11. Select the new realm and click Add (+) to open the Users & Groups window. To switch between the Users list and the Groups list, click Users or Groups in the window.
  12. To add users or groups to a realm, drag users to the Users & Groups column on the right of the Realms pane. When users or members of a group you’ve added to the realm connect to the site, they must supply their user name and password.
  13. Limit realm access to specified users and groups by setting the following permissions using the up and down arrows in the Permissions column:
    • Browse Only: Permits users or groups to browse the website. Â Browse and Read WebDAV: Permits users or groups to browse the website and also read the website files using WebDAV.
    • Browse and Read/Write WebDAV: Permits users or groups to browse the website and also read and write to website files using WebDAV.
    • None: Prevents users or groups from using any permissions. Click Save. Use the Realms pane to delete a user or group by selecting the name and clicking the Delete (–) button.

(Page 39)