操作系统:ubuntu13.10服务器:nginx1.6在nginx配置根据url指向不同访问不同的目录使用location/目录名{...}可以做到不同的目录访问但是我想搭建laravel4framework,想通过/coolwifi/test就直接解析成/coolwifi/public/index.php/test,但是会报错:Symfony\Component\HttpKernel\Exception\NotFoundHttpException但是通过http://localhost/coolwifi/public/index.php/test访问是可以的我该怎么做?default配置文件如下:server{listen80default_server;listen[::]:80default_serveripv6only=on;root/home/kimhwawoon/nginx;indexindex.phpindex.htmlindex.htm;#Makesiteaccessiblefromhttp://localhost/server_namelocalhost;location/coolwifi/{indexindex.php;#if(!-e$request_filename){#rewrite^/(.*)$/public/index.php?$1last;#break;#}try_files$uri$uri//coolwifi/public/index.php?$args;}location/phpmyadmin/{indexindex.phptry_files$uri$uri//phpmyadmin/index.php?$args;}location/swagger/{indexindex.htmlindex.php;}location/doc/{alias/usr/share/doc/;autoindexon;allow127.0.0.1;allow::1;denyall;}location~\.php${fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;includefastcgi_params;}}
幕布斯6054654
相关分类