Q. How do I install Nginix websever under FreeBSD operating systems?
A. nginx [engine x] is a HTTP server, reverse proxy and mail proxy server written by Igor Sysoev. It is a lightweight web server, licensed under a BSD-like license. It the fifth most popular web server.
Update FreeBSD Ports Tree
Type the following command to update FreeBSD tree, enter:
# portsnap fetch update
FreeBSD Install Nginx Web Server
Type the following command to install Nginx web server:
# cd /usr/ports/www/nginx
# make install clean
Make sure you select important option such as REWRITE_MODULE, SSL_MODULE and others as per your requirements.
Turn on Nginx Webserver
Type the following command to turn on Nginx server
echo 'nginx_enable="YES"' >> /etc/rc.conf
To start Nginx, enter:
# /usr/local/etc/rc.d/nginx start
Important Information about Nginx Webserver
- Nginx Default configuration file: /usr/local/etc/nginx/nginx.conf
- Nginx Default http / https port: 80 / 443
- Nginx Default error log file: /var/log/nginx-error.log
- Nginx Default access log file: /var/log/nginx-access.log
- Nginx Default DocumentRoot: /usr/local/www/nginx/
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop
















{ 4 comments… read them below or add one }
Can you add a nginx uninstall ?
cd /usr/ports/www/nginx
make deinstall
n00b
how can I install nginx with custom [3d-party] modules?
to upgrade nginx and recompile with new option with ssl support on freebsd :
portupgrade -СR nginx