apiVersion: v1
kind: ConfigMap
metadata:
  namespace: test
  name: nginx-config
data:
  nginx.conf: |
    server {
      listen       80;
      server_name  test.simmoc.cn;
      root /var/www/html/public;
      index index.php;
      charset utf-8;
      sendfile off;

      gzip on;
      gzip_min_length 1k;
      gzip_buffers 4 16k;
      gzip_comp_level 2;
      gzip_types application/json;
      gzip_vary on;
      gzip_disable "MSIE [1-6]\.";
      client_max_body_size 20m;
      location / {
          try_files $uri $uri/ /index.php?$query_string;
      }
      location = /favicon.ico { access_log off; log_not_found off; }
      location = /robots.txt  { access_log off; log_not_found off; }

      location ~ \.php$ {
        fastcgi_pass	php-fpm:9000;
        fastcgi_index	index.php;
        fastcgi_param	SCRIPT_FILENAME /data/www/public/$fastcgi_script_name;
        include		fastcgi_params;
      }
    }