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  
	}
}

  

Talk is cheap, show me the code.
原文地址:https://www.cnblogs.com/cidgur/p/7884178.html