I had problems getting .php files to render (dunno why, as I run several sites that utilize PHP on my LAN. I guess the issue was that I keep forgetting that Macs are similar to BSD and that I'm still a bit intimidated by the file structure of Macs.), so I did a web search and found the following:
http://www.devarticles.com/c/a/Apache/Using-Apache-and-PHP-on-Mac-OS-X/
cd /etc/httpd
Next step is to use "root" privileges, start up the text editor named "Pico" and edit the "httpd.conf" file.
Use the following command in the Terminal.app:
sudo pico httpd.conf
Type the root password and you are ready to go.
Locate the 4 lines:
#LoadModule php4_module
#AddModule mod_php4.c
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
Use your arrow keys to navigate the document and remove only the pound signs "#". The best way to navigate is to use the DOWN arrow key and stay to the left Side of the document. To remove the pound sign, hit the right arrow to the right Of the sign and then hit the DELETE key.
Warning: Only remove the pound signs!! Keep the lines of code where they are and do not relocate them!! You have been warned!
The changed lines should look like this:
LoadModule php4_module
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Save the file by hitting the CTRL + X keys. Pico will ask you if you want to save the document, just hit the Y key to say “YES”. By uncommenting the lines you will load PHP as a module and help the Apache Web Server Serve any PHP file types. You can also create PHP files with another extension simply by adding another Type to the list in the "httpd.conf" file.
What if I wanted all of my PHP files to end with the. bozo extension? Simple, just add this line to the "httpd.conf" file situated next to the AddType section.
AddType application/x-httpd-php .bozo
After you save the file and restart the Apache Web Server, any PHP file saved with that .bozo extension would display your PHP coding just like a normal PHP file. Now close and save the file. We have to restart the Apache Web Server for everything to take effect. If Apache is running, turn it off by clicking the "Web Sharing On" button that says, "Stop" located in the "Sharing" Section of the System Preferences.
This helped totally, and I can now monitor my system in a pretty GUI.
I'd still like to give ntop a spin, though. I friend showed me his install of ntop and I was highly impressed. Looks like a new project for me!
No comments:
Post a Comment