Support #724

Install SSL-Decoder on FreeBSD

Added by Daniel Curtis over 8 years ago. Updated over 8 years ago.

Web Server
Target version:
Start date:
Due date:
% Done:


Estimated time:
0.50 h
Spent time:


This is a guide on how I installed ssl-decoder with nginx on FreeBSD 9.

Prepare the Environment

  • Make sure the system is up to date:
    pkg update && pkg upgrade
  • Install a few dependencies:
    pkg install nginx php56 pecl-intl php56-bcmath php56-curl php56-filter php56-mbstring php56-openssl php56-xml python2 py27-netaddr

Install Nginx

  • Start and enable nginx at boot:
    echo 'nginx_enable="YES"' >> /etc/rc.conf
    service nginx start
  • Create a configuration directory to make managing individual server blocks easier
    mkdir /usr/local/etc/nginx/conf.d
  • Edit the main nginx config file:
    vi /usr/local/etc/nginx/nginx.conf
    • And strip down the config file and add the include statement at the end to make it easier to handle various server blocks:
      #user  nobody;
      worker_processes  1;
      error_log  /var/log/nginx-error.log;
      events {
          worker_connections  1024;
      http {
          include       mime.types;
          default_type  application/octet-stream;
          sendfile        on;
          #tcp_nopush     on;
          #keepalive_timeout  0;
          keepalive_timeout  65;
          #gzip  on;
          # Load config files from the /etc/nginx/conf.d directory
          include /usr/local/etc/nginx/conf.d/*.conf;
  • Configure the default PHP settings
    cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
  • Edit /usr/local/etc/php-fpm.conf:
    vi /usr/local/etc/php-fpm.conf
    • Make the following changes:
      listen = /var/run/php-fpm.sock
      listen.owner = www = www
      listen.mode = 0660
  • Start and enable PHP-FPM at boot:
    echo 'php_fpm_enable="YES"' >> /etc/rc.conf
    service php-fpm start

Install SSL-Decode

  • Clone ssl-decode from GitHub:
    cd /usr/local/www
    git clone
  • Create a server block:
    vi /usr/local/etc/nginx/conf.d/
    • Add the following:
      server {
          listen       80;
          root         /usr/local/www/ssl-decoder;
          access_log   /var/log/;
          error_log    /var/log/;
          location / {
              index  index.php index.html index.htm;
          # For all PHP requests, pass them on to PHP-FPM via FastCGI
          location ~ \.php$ {
              fastcgi_pass unix:/var/run/php-fpm.sock;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              fastcgi_param PATH_INFO $fastcgi_script_name;
              include fastcgi_params; # include extra FCGI params
  • Change the ownership of ssl-decode to the www user:
    chown -R www:www /usr/local/www/ssl-decoder
  • Restart nginx:
    service nginx restart



Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Updated by Daniel Curtis over 8 years ago

  • Subject changed from Install SSL-Decode on FreeBSD to Install SSL-Decoder on FreeBSD
  • Description updated (diff)

Updated by Daniel Curtis over 8 years ago

  • Status changed from In Progress to Resolved
  • Start date changed from 01/16/2016 to 01/17/2016
  • % Done changed from 50 to 100

Updated by Daniel Curtis over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF