nginx的配置文件(laravel)

worker_processes  1;

events {

worker_connections  1024;

}

http {

include       mime.types;

default_type  application/octet-stream;

sendfile        on;

keepalive_timeout  65;

server {

listen 80;

server_name laravel4.home.com;

root '/www/laravel-v4.2.11/public';

index index.html index.php;

location / {

try_files $uri $uri/ /index.php$is_args$query_string;

}

location ~ \.php$ {

try_files $uri =404;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

error_page   500 502 503 504  /50x.html;

location = /50x.html {

root   html;

}

}

server {

listen 80;

server_name laravel5.home.com;

root '/www/laravel5/public';

index index.html index.php;

location / {

try_files $uri $uri/ /index.php$is_args$query_string;

}

location ~ \.php$ {

try_files $uri =404;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

error_page   500 502 503 504  /50x.html;

location = /50x.html {

root   html;

}

}

}

你可能感兴趣的:(nginx的配置文件(laravel))