FreeBSD Install Nginx Webserver

(From: http://www.cyberciti.biz/faq/freebsd-install-nginx-webserver/)

 

 

FreeBSD Install Nginx Webserver

by VIVEK GITE on MAY 13, 2008 · 2 COMMENTS


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

Fig.01: FreeBSD Nginx Web Server Installation Options

Fig.01: FreeBSD Nginx Web Server Installation Options


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/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值