zoukankan      html  css  js  c++  java
  • nginx 配置文件(支持thnkphp3.2~5)

    server {
    
      listen 8080 ;
      server_name localhost;
      set $root /var/www/myweb;
      
      #listen 443 ssl;
      #ssl_certificate *.pem;
      #ssl_certificate_key *.key;
      #ssl_session_timeout 5m;
      #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
      #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      #ssl_prefer_server_ciphers on;
      
      location ~ .*.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ {
        root $root;
        client_max_body_size 100M;
      }
      location / {
        index index.php;
        if (!-e $request_filename) {
          rewrite ^/(.*)$ /index.php/$1 last;
          break;
        }
        root $root;
        client_max_body_size 100M;
      }
      location ~ .php/?.*$ {
        root $root;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
    
        set $fastcgi_script_name2 $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+.php)(/.+)$") {
          set $fastcgi_script_name2 $1;
          set $path_info $2;
        }
        fastcgi_param PATH_INFO $path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name2;
        client_max_body_size 100M;
      }
       include /etc/nginx/mime.types;
        default_type application/octet-stream;
    
      }

     监控conf

    server {
    	listen       8001;
    	server_name  localhost;
    
    	location /nginx {
    		stub_status on;
    		access_log off;
    		allow 127.0.0.1;
    		deny all; 
    	}
    	location /phpfpm {
    		fastcgi_pass 127.0.0.1:9000;
    		include fastcgi_params;
    		fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
    		allow 127.0.0.1;
    		deny all; 
    	}
    }
  • 相关阅读:
    编译debian内核
    mini2440 最小根文件系统制作和nfs启动
    mini2440 uboot烧写uImage
    51单片机串口烧写故障
    uboot 2013.01 代码简析(3)第二阶段初始化
    uboot 2013.01 代码简析(2)第一阶段初始化
    uboot 2013.01 代码简析(1)开发板配置
    uboot 2013.01 s3c6400编译失败
    Shiro
    Shiro
  • 原文地址:https://www.cnblogs.com/dongqiliang/p/12305742.html
Copyright © 2011-2022 走看看