12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Network Services—Internet ServersApacheThere are various versions of apache web server available under ports tree. Thewww/apache13 directory contains Apache 1.3 which is the legacy and stable version ofapache web server. The newer versions are 2.0 (www/apache20 directory), 2.1(www/apache21 directory), and 2.2 (www/apache22 directory). Apache 2.0 is thecurrent stable version that introduces many improvements over the previous versionas well as a revised and modular configuration system. Newer versions (2.1 and 2.2)are offering cutting-edge features but they are still under development and are notrecommended for use in a production environment. If you are deploying apache in aproduction environment, you may want to choose between Apache 1.3 or Apache 2.0.It is actually a matter of taste when it comes to choosing the right versionof the apache web server. You are most likely to go for a newer stableversion, unless you need an old application, which is not compatible withnewer version of web server.Once you have installed your favorite apache web server from ports, you shouldenable the daemon in the rc.conf file. Different versions of apache have differentvariable names. You should find which variable you should set, by running theappropriate rc script. For example:# /usr/local/etc/rc.d/apache2 rcvarapache2_enable=NOThen add the appropriate variable to rc.conf as usual:apache2_enable="YES"Apache stores configuration files under /usr/local/etc/apache. (This may varyslightly in different versions; for example apache 2.0 looks in /usr/local/etc/apache2 and so on.) Moreover, it looks for web pages under /usr/local/www/data.(This would also vary across different apache versions; for example apache 2.2 looksfor /usr/local/www/apache22.) Usually, this directory is symlinked to thedata-dist directory that contains default web pages. It is suggested that youcreate your own subdirectory and symlink "data" to your own directory, keepingdata-dist intact.# cd /usr/local/www# mkdir homepageIt is not advisable to use the default data-dist directory, as it may notbe preserved across upgrades and your files may be overwritten. It isrecommended that you create your own directory and symlink "data"to it.[ 228 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!