If you are using 10.7 server to administer any sort of website then you may have noticed that Apple has removed the bulk of the administration capabilities once found in the Server Admin app, and shifted a tiny fraction of that functionality to the Server app. Now one could speculate that if indeed Apple is shifting to a home server market, and it is currently frowned upon to run a robust website over a shared internet connection from ones living room that Apple may have done this to discourage users from using their new OS for that reason, however for those of us who need to run websites on 10.7 for our job or because we absolutely love OSX Servers then there are a few alternatives.
I have been playing around with two pieces of software that promise to help bring back this lost functionality in an easy to use GUI tool and perhaps even restore a little sanity to running a website on Lion. The first application that I reviewed was called VirtualHostX.
VirtualHostX 3.0 is the easiest way to host and share multiple websites on your Mac. It’s the perfect solution for web designers working on more than one project at a time. (Aren’t we all?) No more nesting folders or asking the programmer across the cubicle for help. With VirtualHostX you can easily create and manage Apache virtual hosts with just a few clicks.
The other feature that I love about this tool is that you can share a private webpage or site that you are working on, that is not publicly available and share it with anyone publicly through a secure password protected connection. This is great if you need to show people updates of your site and their not on the local subnet. This tool allows you to code custom directives (If you need a list you can check out my last post Missing Manual). Read more →
I just started using 10.7 Lion Server at my organization and I have to admit it is nice in some ways and infuriating in others. Apple has certainly fixed and introduced quite a few new features such as Profile Manager but have removed features like Mobile Access. The hardest hit service in my opinion when it comes to 10.7 server administration is the Web service. Apple has stripped this service completely out of the Server Admin app and has added a dumbed down version of the service to the Server app. If your unfamiliar the Server app is a program called “Server” that has the worst possible GUI interface and the least possible settings for all services that run through it which is a shame.
The purpose of this entry is to talk about 10.7 server and show you how to accomplish everything that you could accomplish from the Server Admin application through commands using terminal or edits to system files in the operating system. Everything below requires that you be logged in as the root user on the server in order to avoid permission issues.
How to enable PHP
Run this command to check if PHP is enabled on 10.7 server.
1 | cat /etc/apache2/httpd.conf|grep libphp5.so |
If the output is
1 | LoadModule php5_module libexec/apache2/libphp5.so |
and not
1 | #LoadModule php5_module libexec/apache2/libphp5.so |
then PHP is enabled. If it is the other way around with a # in the beginning of the line you can just edit the httpd.conf file manually with Read more →