$ cd ~/Downloads $ tar xvzf pcre-8.5 $ cd pcre-8.5 $ sudo ./configure --prefix=/usr/local $ sudo make $ sudo make install
$ cd ~/Downloads $ tar xvzf nginx-1.6.0.tar.gz $ cd nginx-1.6.0 $ sudo ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations" $ sudo make $ sudo make install
$ sudo nginx
$ sudo nginx -s stop
server {
listen 80;
server_name www.dutycode.com test.dutycode.com;
add_header Cache-Control private;
charset utf-8;
fastcgi_intercept_errors on;
location / {
proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_intercept_errors on;
}
}
|