Apache

Apache in Freebsd handbook
http://www.freebsd.org/doc/en/books/handbook/network-apache.html
Set the Server Name and Admin Email Address
vi /usr/local/etc/apache/httpd.conf
To launch Apache at system startup, add the following line to /etc/rc.conf:
apache_enable="YES"
or for Apache 2.2:
apache22_enable="YES"
For Mapserver mapscript add this line to httpd.conf
eg /usr/local/etc/apache22/httpd.conf
AddType application/x-httpd-php .phtml
vi /etc/rc.conf
To start apache
/usr/local/sbin/apachectl
When we installed mapserver Apache 1.3 was installed
However we require Apache 22
When we try and install aApache 22
we get
So we need to deinstall apache 13
cd /usr/ports/www/apache13
make deinstall
then install apache22
cd /usr/ports/www/apache22
make install
If you get error Starting apache22.
[Wed Sep 17 22:01:58 2008] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
Then found solution herehttp://www.cyberciti.biz/faq/failed-to-enable-the-httpready-accept-filter/
http://www.freebsd.org/doc/en/books/handbook/network-apache.html
Set the Server Name and Admin Email Address
vi /usr/local/etc/apache/httpd.conf
To launch Apache at system startup, add the following line to /etc/rc.conf:
apache_enable="YES"
or for Apache 2.2:
apache22_enable="YES"
For Mapserver mapscript add this line to httpd.conf
eg /usr/local/etc/apache22/httpd.conf
AddType application/x-httpd-php .phtml
vi /etc/rc.conf
To start apache
/usr/local/sbin/apachectl
/usr/local/sbin/apachectl start
[Sun Apr 18 07:55:00 2010] [alert] httpd: Could not determine the server's fully qualified domain name, using 192.168.150.20 for ServerName
/usr/local/sbin/apachectl start: httpd started
When we installed mapserver Apache 1.3 was installed
However we require Apache 22
When we try and install aApache 22
we get
===> Installing for apache-2.2.13
===> apache-2.2.13 conflicts with installed package(s):
apache-1.3.41_1
They install files into the same place.
Please remove them first with pkg_delete(1).
*** Error code 1
Stop in /usr/ports/www/apache22.
*** Error code 1
Stop in /usr/ports/www/apache22.
So we need to deinstall apache 13
cd /usr/ports/www/apache13
make deinstall
then install apache22
cd /usr/ports/www/apache22
make install
If you get error Starting apache22.
[Wed Sep 17 22:01:58 2008] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
Then found solution herehttp://www.cyberciti.biz/faq/failed-to-enable-the-httpready-accept-filter/
Just open shell prompt and type the following command to load accf_http under FreeBSD :
# kldload accf_http
Restart apache:
# /usr/local/etc/rc.d/apache22 restart
Update /boot/loader.conf file
Type the following command so that driver get loaded at the time of booting system:
# echo 'accf_http_load="YES"' >> /boot/loader.conf