Prerequisites:
FreeBSD 7.2-RELEASE
Post By: Ren Blevins
Apache is used everywhere. For more information visit http://www.apache.org/.
This tutorial installs version Apache Server 2.2.14_5 Read through the whole thing first then go back and run the install..
Install Apache via ports:
prompt# cd /usr/ports/www/apache22
prompt# make install && make clean
Got this error:
===> apache-2.2.14_5 cannot install: unknown LIBTOOL version: 22.
*** Error code 1Stop in /usr/ports/www/apache22.
As a side note: I also tried making firefox 3.6 and got this error: I'm sure it's related.
===> Found libtool-1.5.26, but you need to upgrade to libtool>=2.2. *** Error code 1
I had updated FreeBSD 7.1-REL to 7.2-REL and still need to fix a few things. You may not have gotten that error.
Anyway. Here is a fix for the libtool upgrade.
Go back to the top and try to make apache again..
In many cases leaving the defaults is fine. However in our particular case we have KDE 3.5 installed and got the following error.
===> Installing for apache-2.2.11_3
===> apache-2.2.11_3 conflicts with installed package(s):
apr-db42-1.3.3.1.3.4
They install files into the same place.
Please remove them first with pkg_delete(1).
*** Error code 1
So here's the fix for that.
prompt# cd /var/db/ports
prompt# rm -r apache22/
prompt# cd /usr/ports/www/apache22
prompt# make install && make clean
Select the APR from ports.
[X] APR_FROM_PORTS Use devel/apr as APR (preferred)
check(select) these too.
[X] THREADS
[X] MYSQL
Leave all the other defaults checked or un-checked.
Good to go..
Do some real basic setup stuff.
Edit /usr/local/etc/apache22/httpd.conf file:
Find and edit the RED TEXT.
Find... ServerAdmin webmaster@domain.tld
Find... ServerName www.domain.tld:80 ...# Uncomment these settings# Various default settings
Include etc/apache22/extra/httpd-default.conf ... <- Delete the "#" comment tick.
Edit /usr/local/etc/apache22/extra/httpd-default.conf file: Find and edit the RED TEXT.
... ServerTokens Prod
... ServerSignature Off
... HostnameLookups Off
Install Apache startup script and start it:
To run apache www server from startup, add apache22_enable="YES"
in your /etc/rc.conf. Extra options can be found in startup script.
prompt# /usr/local/etc/rc.d/apache22 start
prompt# echo 'apache22_enable="YES"' >> /etc/rc.conf
Test:
Visiting either “http://domain.tld/” or “http://YOUR_IP/” should now bring up your machine’s default Apache web page (Something along the lines of “It Works!“.
Edit /usr/local/etc/apache22/extra/httpd-vhosts.conf file: If you want to set up some virtual hosts..
All done. Good Luck.
Post By: Ren Blevins
Originally all How to, config, setups, and supporting documentation was researched and compiled so we could find working solutions for our particular environment. We primarily run and develop FreeBSD 7.2, 6.2 and Mac OS X 10.6 Clients and servers.
Thank You for visiting we hope you find this site useful in your network projects.

Post new comment