Configuring the Nginx Server
You can now configure the server. Nginx is most commonly run using Virtual Hosts, like what most people do with Apache these days. The process is similar, with mainly syntax differences.
If you install using the package manager, all configuration files for Nginx are located in /etc/nginx
. The primary configuration file is /etc/nginx/nginx.conf
. Here is an example of that file:
user www-data;worker_processes 1;# error_log /var/log/nginx/error.log;events { worker_connections 1024;}http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /var/log/nginx/access.log; sendfile on; tcp_nopush on; #tcp_nodelay on;
Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.