码迷,mamicode.com
首页 > 其他好文 > 详细

nginx搭建的cdn服务器的nginx.conf配置文件

时间:2015-04-20 00:22:43      阅读:268      评论:0      收藏:0      [点我收藏+]

标签:

默认的nginx.conf配置文件

worker_processes 1;
events {
    worker_connections 1024;
}
http {
    access_log off;
    client_body_temp_path temp/client_body_temp;
    fastcgi_temp_path temp/fastcgi_temp;
    scgi_temp_path temp/scgi_temp;
    uwsgi_temp_path temp/uwsgi_temp;
    proxy_temp_path temp/proxy_temp;

    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Accept-Encoding "";
    proxy_set_header Connection "keep-alive";

    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 10;
    server {
        listen 80;
        location / {
            proxy_pass https://test:443;
        }
    }
    server {
        listen 443 ssl;
        ssl_certificate cert/test.crt;
        ssl_certificate_key cert/test.key;
        location / {
            proxy_pass https://test:443;
        }
    }
}

 

nginx搭建的cdn服务器的nginx.conf配置文件

标签:

原文地址:http://www.cnblogs.com/firadio/p/4440427.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!