thinkphp5 nginx配置

 余温
2018年03月12日 14时09分
 php
log_format  5.5sit.com  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
server
	{
		listen       80 default_server;
		server_name 5.5sit.com;
		#if ($host != '5.5sit.com' ) {
          #    rewrite ^/(.*)$ http://5.5sit.com/$1 permanent;
          #}
		index index.html index.htm index.php default.html default.htm default.php;
		root  /home/wwwroot/default/tp/public;

		#include other.conf;
		include enable-php7.1.conf;
	
	   location /{
					if (!-e $request_filename) {
						rewrite ^/(.*)$ /index.php?s=/$1  last;
						break;
					}
				} 

		 location /nginx_status
        {
            stub_status on;
            access_log   off;
        }
 
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }
 
        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }
 
        location ~ /.well-known {
            allow all;
        }
 
        location ~ /\.
        {
            deny all;
        }
 
		access_log  /home/wwwlogs/5.5sit.com.log  5.5sit.com;
	}
	
	
	


{{vo.nickname}}:{{vo.content}}

{{vo.time}} 回复


  • {{level.nickname}} 回复 {{level.father_nickname}}{{level.content}}
  • {{level.time}} 回复


@
登陆后评论