美文网首页
CI、Nginx、SSL配置

CI、Nginx、SSL配置

作者: 码一 | 来源:发表于2017-08-24 11:46 被阅读0次

    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配置

          本文链接:https://www.haomeiwen.com/subject/togsdxtx.html