美文网首页
nginx的配置文件(laravel)

nginx的配置文件(laravel)

作者: 汪南 | 来源:发表于2016-01-05 16:49 被阅读0次

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)

      本文链接:https://www.haomeiwen.com/subject/gbjzhttx.html