Installing Apache and php4 on FreeBSD (5.x) is relatively painless, if you use the FreeBSD ports system. After logging in as root:
1. Install Apache (1.3 in this example) from FreeBSD ports.
#cd /usr/ports/www/apache13
#make install clean
2. Add Apache to rc.conf so that it starts at boot.
#echo 'apache_enable="YES"' >> /etc/rc.conf
3. Install php4 and extensions from FreeBSD ports.
#cd /usr/ports/www/mod_php4
#make install clean
#cd /usr/ports/lang/php4-extensions
#make install distclean
4. Check to see that Apache is configured for php4.
#cd /usr/local/etc/apache
#more httpd.conf
The following lines in httpd.conf should be UNcommented:
LoadModule php4_module libexec/apache/libphp4.so
AddModule mod_php4.c
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm
</IfModule>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.