I'll take the challenge just for the heck of it.
First and foremost, you need to have the necessary packages installed. I assume that this shouldn't be a problem. You can get the latest packages for Apache, PHP and MySQL from your
nearest Slackware-current mirror.
The first file that you should take a look at is
/etc/apache/httpd.conf. This is where you configure your Apache HTTP server. The default setting would be OK for an intranet web site, you only need to worry about getting PHP functionality for Apache.
If you have this file:
/etc/apache/mod_php.conf, you have an easy job ahead as you only need to look for this line in your httpd.conf, and uncomment it (ie. remove the leading #):
Code:
#Include /etc/apache/mod_php.conf
If not, you have to do the following:
You can do this by loading the PHP4 module... Run a search for
LoadModule in your httpd.conf file. You should see a group of entries similar to these:
Code:
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
LoadModule env_module libexec/mod_env.so
LoadModule define_module libexec/mod_define.so
At the end of these entries, stick in your PHP4 LoadModule entry which should look like this:
Code:
LoadModule php4_module libexec/libphp4.so
After that, scroll downwards a little bit and you should see the
AddModule section... here, you should add the AddModule entry for PHP4, which should look like this:
Code:
AddModule mod_php4.c
Now you should add directory index support for PHP files, ie. make the server recognise
index.php along with the common index.html file. To do this look for the
<IfModule mod_dir.c> section and modify it to look as follows:
Code:
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
After that, look for the AddType section and add this entry to it:
Code:
AddType application/x-httpd-php .php
Walla... done with httpd.conf
Now the next step... the
/etc/apache/php.ini file. By default, it should already be loaded. Just check to see if you can find this line:
Yes? Good
Now you should check
the default MySQL privileges and set the root password.
You're now almost there, all you need to do now is to make sure your necessary rc files are executable... Just go to your
/etc/rc.d dir, and
chmod +x rc.httpd rc.mysql.
The next time you reboot your machine, Apache and MySQL will run at startup
Oh... and in case you're wondering where your web pages are... They're at
/var/www/htdocs... this is defined in your httpd.conf file and you can change it to something else. But make sure that the directory is accessable and writable by the user who's going to manage your web site.