Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I install Apache and php4 on FreeBSD?

Apache, php4, FreeBSD

How do I install Apache and php4 on FreeBSD?

by  Wishdiak  Posted    (Edited  )
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>

5. Restart Apache.
#apachectl restart
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top