laravel 项目 配置 nginx

server {  
	listen       80;  
	server_name  laravel.com;  
	set  $DOC_ROOT /var/www/html/laravel.com/public;  
	root $DOC_ROOT;  
	index index.php index.html index.htm;
	location / {
		try_files $uri $uri/ /index.php?$query_string;
	}

	location ~ \.php {
		expires        off; ## Do not cache dynamic content  
		fastcgi_pass   127.0.0.1:9000;  
		fastcgi_param  SCRIPT_FILENAME  $DOC_ROOT$fastcgi_script_name;   
		include        fastcgi_params; ## See /etc/nginx/fastcgi_params  
	}
}

  

posted @ 2017-11-23 12:03  cidgur  阅读(536)  评论(0编辑  收藏  举报