Apache, MySQL and PHP3
Starting Apache
Apache didn't start because we didn't have a server name so we went into /etc/apache/httpd.conf. We uncommented the ServerName and added our static IP address (if you haven't set up your host name yet). You can set up your local hostname by editing /etc/hostname.
We changed /etc/hosts by adding
203.xx.xx.xx squelchy squelchy.wilderness.org.au
This is a local DNS which maps hostnames to IP addresses just for the local machine.
There is an Alias in Apache where /doc points to /usr/share/doc then we allowed access from our local LAN so we could view package documentsation through our browser. This was in:
/etc/apache/httpd.conf
Then we restarted Apache
/etc/init.d/apache restart
[ We had some trouble accessing our documentation files through a browser within the LAN because Apache permissions denied us access because we were browsing from across the network. Initially Apache is configured to only allow access to /doc/ from the local machine ie 127.0.0.1]
top
Checking set up of MySQL
These installed really well from apt. First thing is to change the root password for mysql. Type:
mysqladmin -u root password [password]
top
How to create new users
We installed phpmyadmin and this pops up when you call http://ourIPaddress/phpmyadmin over a browser. This is pretty self explanatory. After adding a new non system user, you have to flush privileges.
mysqladmin -u root -p flush-privileges
The other way, for users on the local system, is to log in as mysql root and do a grant command from within mysql. http://www.cat.org.au/cgi-bin/fom?file=34
top
Running PHP3 files
To run php3 files with php4, you have to go into /etc/apache/httpd.conf and add .php3 to the end of the line
AddType application/x-httpd-php .php .php3
