• 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;
                 #  }
          # }
    }

  • 相关阅读:
    麒麟系统开发笔记(四):从Qt源码编译安装之编译安装QtCreator4.8.1,并配置编译测试Demo
    红胖子创业一年整总结:前二十年题记,萌芽初期,外包初期,创业初期,未来规划
    麒麟系统开发笔记(二):国产麒麟系统搭建Qt开发环境安装Qt5.12
    麒麟系统开发笔记(三):从Qt源码编译安装之编译安装Qt5.12
    OpenCV开发笔记(七十四):OpenCV3.4.1+ffmpeg3.4.8交叉编译移植到海思平台Hi35xx平台
    【转】虚拟机网络服务启动失败Failed to start LSB 解决方法
    编程中常用的加密算法
    存储用户密码应该使用什么加密算法?
    lru 淘汰算法
    Redis 如何持久化
  • 原文地址:https://www.cnblogs.com/witer666/p/1678461.html
Copyright © 2020-2023  润新知