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 →