CI、Nginx、SSL配置

server{

      listen 80;

      server_name www.3.com;

       return  301  https://$server_name$request_uri;

}

server {

     listen 443;

    server_name www.3.com;

     ssl on;

    ssl_certificate /path/nginx/conf/cert/www.3.com.pem;

    ssl_certificate_key /path/nginx/conf/cert/www.3.com.key;

    ssl_session_timeout 5m;

    ssl_protocols TLSv1 TLSv1.1  TLSv1.2;

    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

    ssl_prefer_server_ciphers on;

    access_log /log_path/api.camelke.com_nginx.log combined;

    index index.html index.htm index.php;

    include /path/nginx/conf/rewrite/other.conf;

    root /home/www/3;

location / {

    if (!-e $request_filename) {

        rewrite ^/(.*)$ /index.php/$1 last;

    }

}

location ~ [^/]\.php(/|$) {

    fastcgi_pass unix:/dev/shm/php-cgi.sock;

    fastcgi_index index.php;

    fastcgi_split_path_info ^(.+\.php)(.*)$;

    fastcgi_param  PATH_INFO $fastcgi_path_info;

    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

    include        fastcgi_params;

}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {

    expires 30d;

    access_log off;

}

location ~ .*\.(js|css)?$ {

    expires 7d;

    access_log off;

}

location ~ /\.ht {

    deny all;

}

吐槽:

       不得不说,这编辑器太难用了!!!

       对于我这种有强迫症的人来说尤其痛苦=_=!!

你可能感兴趣的:(CI、Nginx、SSL配置)