GettingStarted
Contents |
Requirements
- gzip module requires zlib library
- rewrite module requires pcre library
- ssl support requires openssl library
Download
Go to the Main Install Page of this wiki to download Nginx. Alternatively, here is a link to the English download page and the original Russian download page .
Installation
After extracting the source, run these commands from a terminal:
./configure make sudo make install
By default, Nginx will be installed in /usr/local/nginx. You may change this and other options with the compile-time options .
Platform-specific Notes and Builds
- Notes on building Nginx on Ubuntu
- Ubuntu Easy installer script with PHP support and MySQL
- Installing Nginx on Fedora, RHEL or CentOS
- How to get the latest Nginx on Gentoo
- x86/64 build for Solaris
- How to Compile nginx on MacOSX
- Nginx building script for Slackware
- Nginx for Windows (32-bit); development, stable, and legacy binaries available
Running Nginx
Start the server by running /usr/local/nginx/sbin/nginx as root. After editing the configuration file at /usr/local/nginx/conf/nginx.conf to your liking, you can reload the configuration with:
kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
The location of nginx.pid might be different on your machine. For Ubuntu, it is located at:
/var/run/nginx.pid
See also:
- Starting, Stopping, and Restarting Nginx for more command-line options and process signals
- Nginx modules for a configuration reference
- Nginx cookbook for solutions to common problems
- Frequently Asked Questions
- Nginx community if you still can't find the answers to your questions