:

docker环境下的悟空CRM Nginx 配置文件

song100e 发布于:2022-7-4 9:42 分类:Nginx  有 250 人浏览,获得评论 0 条  

server {
    listen 80;
    server_name www.wukong.com;
    root /www/wukong;
    index index.php;

    location / {
        # Redirect everything that isn't a real file to index.php
        #try_files $uri $uri/ /index.php$is_args$args;
		if ( !-e $request_filename ) {
			rewrite ^/(.*)$ /index.php/$1 last;
		}
		try_files $uri $uri/ /index.php$is_args$args;
    }


    # deny accessing php files for the /assets directory
    location ~ ^/assets/.*\.php$ {
        deny all;
    }

    location ~ \.php(.*)$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  PATH_INFO  $fastcgi_path_info;
        #fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;#不注释可能报access denied  
        include        fastcgi_params;
    }
}
赞助我,共同学习进步!