Nginx in installation Getting Started

Source: Internet
Author: User
Tags openssl library


1. First you need to install the necessary libraries, Pcre,zlibsudo apt-get install libpcre3 Libpcre3-dev If the file is not found, download the source file for installation.


2. Unzip the downloaded Nginx source code. Go to Folder: sudo./configure the resulting output such as the following: Configuration summary
+ Using System PCRE Library
+ OpenSSL Library is not used
+ Using BUILTIN MD5 code
+ SHA1 Library is not found
+ Using System zlib Library

Nginx path prefix: "/usr/local/nginx"
Nginx binary file: "/usr/local/nginx/sbin/nginx"
Nginx configuration prefix: "/usr/local/nginx/conf"
Nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
Nginx pid file: "/usr/local/nginx/logs/nginx.pid"
Nginx error log file: "/usr/local/nginx/logs/error.log"
Nginx HTTP access log file: "/usr/local/nginx/logs/access.log"
Nginx HTTP client request body Temporary files: "Client_body_temp"
Nginx HTTP proxy temporary files: "Proxy_temp"
Nginx http fastcgi temporary files: "Fastcgi_temp"
Nginx http Uwsgi temporary files: "Uwsgi_temp"
Nginx http scgi temporary files: "Scgi_temp"
3. Sudo make4. sudo make install 5. Review the configuration file and start [email protected]:~/nginx-1.0.15$sudo/usr/local/nginx/sbin/nginx-t
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful
[Email protected]:~/nginx-1.0.15$Sudo/usr/local/nginx/sbin/nginx
At this point the viewing process is:vonz[email protected]:~/nginx-1.0.15$ Ps-axu | grep nginx
root 9723 0.0 0.0 22536 592?

Ss 22:49 0:00 Nginx:master Process/usr/local/nginx/sbin/nginx
Nobody 9724 0.0 0.0 22936 1052?

S 22:49 0:00 Nginx:worker Process
6. You can then simply test the index page via curl: [Email protected]:~$Curl http://localhost:80/
<title>welcome to Nginx!</title>
<body bgcolor= "white" text= "Black" >
<center></body>
Based on the configuration of the nginx.conf. The response file is a html/index.html page: server {
Listen 80;
server_name localhost;

Location/{
root HTML;
Index index.html index.htm;
}}

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Nginx in installation Getting Started

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.