First, installation
sudo wget http://nginx.org/download/nginx-1.4.4.tar.gz
sudo tar zxvf ng ....
CD nginx-1.4.4
sudo./configure
sudo make
sudo make install
--------------------
./configure:error:the HTTP Rewrite module requires the PCRE library.
---------------------------------------
Workaround:
Install Nginx dependent package Run command:
sudo apt-get install Libssl-dev
sudo apt-get install libpcre3 Libpcre3-dev
2014/12/29 05:04:14 [ERROR] 11808#0:open () "/usr/local/nginx/logs/nginx.pid" failed (2:no such file or directory)
---------------------
WORKAROUND: [[email protected] nginx]#/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf using Nginx- The parameter of c specifies the location of the nginx.conf file "/usr/local/nginx/logs/nginx.pid" failed (2:no such file or directory) error, Into the logs file found there is indeed no Nginx.pid file two, the input IP appears welcome to Nginx on behalf of OK, nginx configuration file directory/usr/local/nginx/conf/nginx.conf "forwarding port" server {
Listen 85;
#Allow file uploads
Client_max_body_size 50M;
Location/{
Proxy_pass http://10.10.3.99:81;
Proxy_pass_header Server;
Proxy_set_header Host $http _host;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header X-scheme $scheme;
}
} IV, sudo/usr/local/nginx/sbin/nginx-s reload restart Nginx
Installing Nginx in Ubutun