标签:configure inline ace 分享 code org star microsoft wget
yum -y install gcc make cmake ncurses-devel libxml2-devel libtool-ltdl-devel gcc-c++ autoconf automake bison zlib-devel
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar -zxvf nginx-1.8.0.tar.gz ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx make make install
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location /{ root /nginxroot; } location = /50x.html { root html; } } location /web1/ { proxy_pass http://192.168.0.37/; } }
location /{ root /web1; index index.html index.php; }
mkdir /nginxroot echo "I am proxy server" >/nginxroot/index.html
mkdir /web1 echo "I am realy server" >/web1/index.html
/usr/local/nginx/sbin/nginx
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; proxy_cache_path /usr/local/nginx/cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=30g; server { listen 80; server_name localhost; location /{ root /nginxroot; } location = /50x.html { root html; } } location /web1/ { proxy_cache cache_one; proxy_cache_valid 200 304 302 24h; proxy_pass http://192.168.0.37/; } }
标签:configure inline ace 分享 code org star microsoft wget
原文地址:http://www.cnblogs.com/lemon-le/p/7791702.html