Homepage

Tutorial installing Nginx + Php5-FPM in FreeBSD 8

This tutorial is running in a FreeBSD vps with IPv6 only from VDS6 with the following :

 
Since the ssh is not configured after first install, we have to change the sshd_config, and reboot the vps. Go to VDSManager – Private Files, and browse to /etc/ssh/sshd_config. Uncomments Port and Listen address, and then reboot the vps.
Next, change the /etc/resolv.conf so the vps can have access to the internet via IPv6, add the Google DNS :

 
 Installing Nginx

Enable the following modules :

Enable the Nginx by editing /etc/rc.conf, and add the following :

 
Installing another package
Before we configure and start the web server, we need to install PCRE,  libtool, PHP with FPM and PHP extensions. Follow these steps:

During the selection module page, select FPM (FastCgi Process Manager).

Since PHP-FPM is a service, we need to add this in /etc/rc.conf:

 
Copying PHP.ini
By default, there is no php.ini specified. So we need to copy the php.ini which has been prepared during port installation.

 
Start the PHP-FPM

Now PHP5-FPM is listening at 127.0.0.1:9001, next, prepare the directory for serving the website.
 
Configure the Nginx.conf

 
Now we have our webserver ready to launch :

Exit mobile version