FreeBSD + NGINX! How to configure and setup?

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?


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

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.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

freeBSD+NGINX install

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

Pre-Install Configuration Step2. make config-recursive

Installation Step3. make install clean

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

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

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.