Installing and configuring Apache 2.2 in FreeBSD 8.1


Installation

Install apache2.2 using the following command:

# pkg_add -r apache22

Configuration

Edit the apache configuration file i.e. /usr/local/etc/apache22/httpd.conf and make the following changes


ServerRoot "/usr/local"
ServerAdmin you@your.address
ServerName www.example.com
DocumentRoot "/usr/local/www/apache22/data"
Listen <ip-address>:80

Save and exit.

Edit the /etc/hosts file and add the following line:

<ip-address>            <hostname>.<domain-name>

eg:

192.168.1.1               host.example.org

Edit the file /boot/loader.conf and Add the following line:

accf_http_load="YES"

Save the file and reboot the machine.

Start the apache server using the following command:

# /usr/local/sbin/apachectl start

To start apache every time the machine boots up add the following line to /etc/rc.conf file:

apache22_enable="YES"
Advertisements

One thought on “Installing and configuring Apache 2.2 in FreeBSD 8.1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s