Skip to content

Instantly share code, notes, and snippets.

@dgoujard
dgoujard / nginx
Created September 11, 2011 18:18
Nginx init.d pour debian (/etc/init.d/nginx)
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@dgoujard
dgoujard / nginx
Created September 11, 2011 19:22
/etc/logrotate.d/nginx
/var/log/nginx/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
@dgoujard
dgoujard / php-fpm
Created September 11, 2011 20:17
/etc/init.d/php-fpm
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
@dgoujard
dgoujard / php-fpm.conf
Created September 11, 2011 20:27
/etc/php/php-fpm.conf
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr/local). This prefix can be dynamicaly changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
@dgoujard
dgoujard / php.ini
Created September 11, 2011 20:28
/etc/php/php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@dgoujard
dgoujard / php-fpm
Created September 11, 2011 20:35
/etc/logrotate.d/php-fpm
/var/log/php-fpm/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /var/run/php-fpm/php-fpm.pid ] || kill -USR1 `cat /var/run/php-fpm/php-fpm.pid`
@dgoujard
dgoujard / nginx.conf
Created September 11, 2011 20:42
/etc/nginx/nginx.conf
user http http;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginx.pid;
@dgoujard
dgoujard / fastcgi_params
Created September 11, 2011 21:01
/etc/nginx/fastcgi_params
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_param QUERY_STRING $query_string;
@dgoujard
dgoujard / default
Created September 11, 2011 21:03
/etc/nginx/site-enabled/default
server {
listen 80;
location / {
root html;
index index.php index.html;
if (-f $request_filename) {
access_log off;
expires max;
}
<?php
class Agent extends Fuel\Core\Agent {}
class Arr extends Fuel\Core\Arr {}
class Asset extends Fuel\Core\Asset {}
class Cache extends Fuel\Core\Cache {}
class CacheNotFoundException extends Fuel\Core\CacheNotFoundException {}
class CacheExpiredException extends Fuel\Core\CacheExpiredException {}
class Cli extends Fuel\Core\Cli {}
class Config extends Fuel\Core\Config {}