FreeBSD + NGINX! How to configure and setup?

Posted April 26, 2015 16k views
NginxGetting StartedNetworkingConfiguration ManagementFreeBSD

I’ve been trying to setup NGINX with freeBSD with no luck. I’m quite new to the platform and programming in general. I’m just a web designer but I’m trying to expand my skill set and knowledge base on the backend.

I’ve found a few tutorials on the web about setting up NGINX with freeBSD but none of them seem to work. I’ve spent all of last night trying to setup up NGINX and get it to serve my web pages.

Can anyone help me with this? I recently created a droplet and installed NGINX. Where do I go from here?

  • Well this has been a great debacle. Never ask a question unless you know the answer first. Actually you should just answer your question yourself in your question whilst asking. That seems to be the best way to get help.

    Otherwise the great geniuses of our day or at least this site will assume you are completely incompetent of conducting a proper google search.

    Well if you’re dumb like me don’t fret I’m working on a simple straight forward tutorial that will show all the lumbering idiots how to setup their NGINX server on freeBSD, judgment and cruelty free.

  • This is a forum, essentially. Most people help when they can. For support, or email

    I run nginx on a freebsd droplet.

    sudo pkg install nginx

    That worked fine for me. Then I edited the configs in


    Make sure your droplet is working fine with the following series. It deals with some of the few differences from a standard freebsd install and these droplets.
    Getting started with FreeBSD

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Pay attention to permissions, users, and groups .
Read the log files for error messages.
Read the FreeBSD manual:

A 5. second Google search: “freebsd nginx” (w/o the quotes) gave me in the very 1st search result: A very promising web page on “How To Install an Nginx, MySQL, and PHP (FEMP) Stack on FreeBSD 10.1”

Learn how use a search engine, or use a search engine before you ask, please.

by Justin Ellingwood
Nginx, MySQL, and PHP can be combined together easily as a powerful solution for serving dynamic content on the web. These three pieces of software can be installed and configured on a FreeBSD machine to create what is known as a FEMP stack. In this guide, we will...
  • This is completely USELESS to me! However intellectually gratifying for you and your ego this only adds frustration to confusion. I’m glad you were able to be F**king DICK! I guess if you can’t contribute anything you should keep your negativity on your side of the screen. That page is on how to setup a FEMP stack I thought I was using redis in place of mySQL and not using PHP altogether. Since this tutorial is on how to setup and configure the STACK unlike you I’m not the smartest guy in the world but I think more than likely this will only take me so far. Won’t you remind me why I asked the question in the 1st place?

    Learn how to calm the hell down and be a better person. Google manners before you post anything else.

freeBSD+NGINX install

Step 1. cd /usr/ports/www/nginx

Pre-Install Configuration
Step2. make config-recursive

Step3. make install clean

Enable NGINX
Step4. echo ‘nginx_enable=“YES”’ >> /etc/rc.conf

Step5. /usr/local/etc/rc.d/nginx start