Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user nginx;
- worker_processes 2;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- worker_connections 2048;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- #access_log /var/log/nginx/access.log main;
- access_log off;
- proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=all:32m max_size=1g;
- sendfile on;
- #tcp_nopush on;
- keepalive_timeout 65;
- gzip on;
- gzip_disable "msie6";
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
- include /etc/nginx/conf.d/*.conf;
- server {
- listen 80;
- location / {
- proxy_pass http://127.0.0.1:81/;
- proxy_cache all;
- proxy_cache_valid 404 502 503 1m;
- proxy_cache_valid any 1h;
- }
- }
- server {
- listen 81;
- location / {
- root /data/www;
- }
- location /images/ {
- root /data;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement