Wednesday, March 4, 2009

Joomla on OSX Server

Decided to install Joomla on the mac mini running osx 10.5 to see how it goes. If successful this could be used to demonstrate to IT a solution to students having to create web sites. Right now we use a combination of coding by hand using php on LAMP, Dreamweaver static web pages on panther and god knows what else.

First let's take a look at the documentation which is the web technologies administation document. We have the Apache web server (only 1.3), although version 2 is installed in /opt/apache2, PHP and mySQL. OSX also support webdav which could be useful for student access. It also has blogs with RSS and Atom support based on Blojsom (http://wiki.blojsom.com/wiki/display/blojsom3/About+blojsom).

Configuration Notes

We start with the web server. To set one up you have to:

1. Create a folder for the website on the server
2. Create a default page in that folder (directory browsing is turned off by default- edit the apache conf file to turn it on)
3. Create a series of subfolders by class, group or student
4. Set webdav access to those folders. This involves creating a realm which sets the access priviledges for a folder. The students will need read/write access to their folder.

Access Notes
  • The apache process runs under the username of www and is a member of the www group (see Users & Groups List).
  • The www group needs read access files within a website
  • The www group needs read/write access to files within the website
  • The www user also needs access to files and folders in the WebDAV realm and to the /var/run/davlocks folder.
  • The website administrator (Owner) needs read/write access to files in the website
  • The everyone user needs to have No Access
We note the conflicting statements on page 17 of the manual about the www group. Since the www user serves web pages read access only makes sense. We shall see. I think they mean the www user needs read access to files and read/execute access to folders because you can't read a directory in a folder without execute rights.

Testing the Web Server

The webserver root is /Library/WebServer/Documents and it contains index.html
We run Safari and goto http://localhost and see the web page so that is working.

Each user has a website folder in their home directory.
We enter http://localhost/~gnickers into Safari and the bank 'Your Website' page is displayed so that is working.

Configure a WebSite

Click on the Server Admin icon
Select the Web Service (we note that Apache is in fact 2.2 - the docs are outdated)
We click the Settings tab and set the server to 50 persistent and 50 connections total. The web site now has a description, a domain and is using the /Library/WebServer/Documents folder. WE check the apache modules and see that PHP5 is checked but that DAV_Module is unchecked. We goto the Options tab and place a tickmark in:
  • Folder Listing
  • WebDav
  • Wiki
  • Blog
but remove the tick marks in webmail, webcal and mailing list. Ok let's take a look at realms.

Realms

Not that realms are enabled we see the Everyone user is there with no access. So we click to add a user. The list of Users & Groups pops up. Where is the www user and www group that is supposed to be running apache? Not listed. We drag gnickers over and make my access read/write. We drag over student and make them read only. We drag over the workgroup and make it read only. To make a test we run safari and go back to http://localhost

It asks us to login which is good and we do with the gnickers account. There are menu items for users and groups. The workgroup is listed but we can't create a wiki as it gives an error message. So we try users and the gnickers user is successful in creating a blog. We go to add a post and boom! - Safari terminates. Ok, run safari again and go back - the first post is listed but with no real text so try to post again and Safari terminates.

No good and we are only on page 22 of the manual and haven't even gotten to Joomla! yet. The differences between the manual and the software do not fill us with confidence. Wondering if the server version of OSX is overkill for what we want to do - it might be easier to use the client osx and install MAMP which we have used before and works very well. I found a short article at http://www.318.com/techjournal/?p=47 which list the steps to install joomla on osx server - there are 19 steps which is a lot more than required to install on my usb stick. Will have to think about this....

Time for Little Dorritt on TVO.

No comments: