• Nginx+Zend Framework Urlwrite配置


    user  www www;

    worker_processes 10;

    error_log  /data1/logs/nginx_error.log  crit;

    #pid        logs/nginx.pid;

    #Specifies the value for maximum file descriptors that can be opened by this process.
    worker_rlimit_nofile 51200;

    events
    {
           use epoll;

           worker_connections 51200;
    }

    http
    {
           include       conf/mime.types;
           default_type  application/octet-stream;

           charset  utf-8;
          
           server_names_hash_bucket_size 128;
          
           #sendfile on;
           #tcp_nopush     on;

           keepalive_timeout 60;

           tcp_nodelay on;

           gzip on;
           gzip_min_length  1k;
           gzip_buffers     4 8k;
           gzip_http_version 1.1;
           gzip_types       text/plain application/x-javascript text/css text/html application/xml;

           server
           {
                   listen       80;
                   server_name localhost.sample.com;
                   index index.html index.htm index.php;
                   root  /var/local/htdocs;

                   #if (-d $request_filename)
                   #{
                   #       rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
                   #}
                   location /shlevod {
       index index.php;
        #配置开始
              if (!-f $request_filename)
       {
        rewrite ^/(.+)$ /shlevod/index.php?$1 last;
       }
      }
      location ~* ^.+\.(js|ico|gif|jpg|jpeg|pdf|png|css)$ {
                access_log   off;
                expires      7d;
      }

    #配置结束
                   location ~ .*\.php?$
                   {
                        include conf/fcgi.conf;     
                        fastcgi_pass  127.0.0.1:8099;
                        fastcgi_index index.php;
                   }

                   log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
                                         '$status $body_bytes_sent "$http_referer" '
                                         '"$http_user_agent" $http_x_forwarded_for';
                   access_log  /data1/logs/access.log  access;
           }

           #server
           #{
            #       listen  80;
             #      server_name  status.blog.s135.com;

              #     location / {
               #         stub_status on;
                #        access_log   off;
                 #  }
          # }
    }

  • 相关阅读:
    HDU 3833 YY's new problem ()
    从文件读入16进制数转化为10进制数再输出到文件中
    UESTC 1215 (思维题 旋转)
    HDU2067卡特兰数
    HDU2050离散数学折线分割平面
    cshell学习
    C++学习1
    QT学习1
    QT Creator常用快捷键
    Ubuntu14.04安装QT5.5
  • 原文地址:https://www.cnblogs.com/witer666/p/1678461.html
Copyright © 2020-2023  润新知