记录自己的php.ini、php-fpm.conf和nginx.conf配置文件

记下自己的php.ini和php-fpm.conf配置,方便下次使用。

php.ini

error_reporting = E_ALL
display_errors = On
display_startup_errors = On
track_errors = On
session.save_path = "/app/php5/var/tmp"
session.bug_compat_42 = On
session.bug_compat_warn = On

date.default_latitude = 31.7667
date.default_longitude = 35.2333
date.sunrise_zenith = 90.583333
date.sunset_zenith = 90.583333

mysqlnd.collect_memory_statistics = On


[xdebug]
zend_extension=/WorkSpace/app/php5/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
xdebug.file_link_format = "txmt://open?url=file://%f&line=%l"
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/tmp/xdebug/

[xcache-common]
zend_extension=/app/php5/lib/php/extensions/no-debug-non-zts-20100525/xcache.so

[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
 xcache.admin.pass = ""

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 32M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 3600
xcache.gc_interval = 300

; Same as aboves but for variable cache
; If you don't know for sure that you need this, you probably don't
xcache.var_size = 0M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

; N/A for /dev/zero
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.cacher = On
xcache.stat = On

 php-fpm.conf

user = huangdd
group =huangdd

nginx.conf

#user  nobody;
worker_processes  8;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    include hosts/*.conf;
}

 hosts下的conf文件(css、js合并脚本)

server
{
    listen       80;
    server_name abc.huangdingding.cn;
    index index.html index.php;
    root  /data0/abc;
    location ~ .*\.php?$
    {
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fastcgi.conf;
    }
    location /js/ { #合并js
        root /data0/abc/public/;
        concat on;#开关
    }
    location /css/ { #合并css
        root /data0/abc/public/;
        concat on;#开关
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|ico)$
    {
      expires      30d;
    }
    location ~ .*\.(js|css)?$
    {
      expires      30d;
    }
    location ~ .*\.(swf)$
    {
      expires    100d;
    }
    access_log  /data0/logs/abc/$remote_addr.log  main; #这里是按照来放ip记录日志。
}

 

转载于:https://www.cnblogs.com/huangdingding/archive/2012/12/20/2826376.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值