1. boot the OS and install 
- install apache, php ngan application ( eg: moodle)
 
3. Install dulu apache..  
- #cd /usr/ports/www/apache22  -> path apache22
 
- #make config  -> nih utk option dalam package
 
- #ee /usr/ports/www/apache22/Make file   -> nih utk tgk version
 
- #make install clean  ->nih untuk install 
 
4. Install php
 
- #cd /usr/ports/lang/php5
 
- #make config  ->jangan lupa select (X) apache (by default tak tick) 
 
-  #make install clean
 
- lepas install ; 
 
 -> akan kasitau 
 "make sure index.php is a part of your Directory Index
 
     AddType  application/x-httpd-php.php
     AddType  application/x-httpd-php-source.php
  1->  so, kena pi kat # ee /usr/local/etc/apache22/https.conf
   ^y (search = DirectoryIndex)
   
    DirectoryIndex  index.html index.php
   
  2->  ^y (search = AddType)
    pastekan 
  AddType 
 application/x-httpd-php.php
        AddType  application/x-httpd-php-source.php
 
---dsb (php.extension, moodle, ...etc)---
5. tukar few setting yek 
 
 1->  setting host
  #ee /etc/hosts
  ip servername@domain.edu.my servername
 2-> setting virtual host
  #cd /usr/local/etc/apache22/extra/httpd-vhost.conf
    
   ServerAdmin username@domain.edu.my 
   DocumentRoot "/data/foldername" 
   ServerName servername.mediu.edu.my 
   ErrorLog "/var/log/httpd-error-form.log" 
   CustomLog "/var/log/httpd-access-form.log" common 
   
6. Start Apache
 # /usr/local/etc/rc.d/apache22 start   -> utk start apache
        restart -> utk restart
        graceful -> utk update, so apache tak mati.
 
7. Few error troubleshoot
 -> error forbidden
  * tukar directory root (# ee /usr/local/etc/apache22/httpd.conf)
   # This should be changed to whatever you set DocumentRoot to. 
 
   # 
   #   "/usr/local/www/apache22/data"> 
      -> tukar kat path yang kita letak shariha.php
 ->if there is anychange need to setup such as 
  Add the following to your Apache configuration, and  restart the server:   
   ### Add the AcceptPathInfo directive only for Apache 2.0.30 or later.
   Alias /moodle /usr/local/www/moodle/    
   AcceptPathInfo On  
   
   AllowOverride None
   Order Allow,Deny 
   Allow from all
   
    
   AllowOverride None
   Order Allow,Deny
   Deny from all
   
 this is need to be added either at httpd.conf or /usr/local/etc/apache22/extra/httpd-vhost.conf
8. Shared object libpcre.so.0 not found required by httpd
1. check httpd path 
# whereis httpd
2. check link shortcut already listed
#ldd /usr/local/sbin/httpd
eg :  libpcre.so.0 => not found
have to change this -> libpcre.so -> libpcre.so.3 to libpcre.so.0 -> libpcre.so.3
# ln -s libpcre.so.3 libpcre.so.0
Then ok.. :)