fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info;
server {
listen 80;
server_name www.sample.com; #主机域名,不要说不认识
index index.html index.htm index.php app.php; #默认的主文件,我自己加了app.php
set $subdomain '';
root /alidata/www/sample/web; #网站代码的磁盘物理路径,注意symfony的根目录是web
include rewrite/symfony2.conf; #rewrite end # 这个是引入symfony相关的配置
location ~ \.php(/.*)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$; #pathinfo的关键配置
fastcgi_param PATH_INFO $fastcgi_path_info; #pathinfo的关键配置
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$ #js,css的文件缓存时间
{
expires 1h;
}
access_log /alidata/log/nginx/access/sample.log; #报错日志
}
~
location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有