Skip to content

Instantly share code, notes, and snippets.

@wodCZ
Created February 7, 2016 15:01
Show Gist options
  • Save wodCZ/cad4a52fa16b72c2bebc to your computer and use it in GitHub Desktop.
Save wodCZ/cad4a52fa16b72c2bebc to your computer and use it in GitHub Desktop.
[global]
error_log = /usr/local/etc/php/5.6/logs/php-fpm.log
daemonize = no
[www]
user = wod
group = staff
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
;php_flag[display_errors] = off
php_admin_value[error_log] = /usr/local/etc/php/5.6/logs/error.log
php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
[global]
error_log = /usr/local/etc/php/7.0/logs/php-fpm.log
daemonize = no
[www]
user = wod
group = staff
listen = 127.0.0.1:9001
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
;php_flag[display_errors] = off
php_admin_value[error_log] = /usr/local/etc/php/7.0/logs/error.log
php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
address=/.app/192.168.99.100
address=/.dev5/127.0.0.1
address=/.dev7/127.0.0.1
worker_processes 1;
user wod staff;
error_log /usr/local/etc/nginx/logs/error.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
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 /usr/local/etc/nginx/logs/access.log main;
error_log /usr/local/etc/nginx/logs/wildcard-error.log debug;
index index.html index.php;
server {
listen 80;
set $passto "127.0.0.1:9000";
set $domain $host;
if ($domain ~ "^(.[^.]*)\.dev5$") {
set $domain $1;
set $servername "${domain}.dev5";
}
if ($domain ~ "^(.[^.]*)\.dev7$") {
set $domain $1;
set $passto "127.0.0.1:9001";
set $servername "${domain}.dev7";
}
server_name $servername sandbox.dec;
root /Users/wod/Sites/$domain/www;
access_log /usr/local/etc/nginx/logs/$domain-access.log main;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass $passto;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment