1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-10 17:30:41 +01:00

nginx and php-fpm plugins

This commit is contained in:
mikka
2012-09-02 15:43:20 +02:00
parent 921d2f49ef
commit 3ef82a908a
5 changed files with 335 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
server {
root /home/{user}/www/{vhost};
index index.php;
server_name {vhost};
error_log /var/log/nginx/{vhost}.error.log;
access_log /var/log/nginx/{vhost}.access.log;
location / {
try_files $uri $uri/ $uri/index.php;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:{pool_port};
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location ~ /\.ht {
deny all;
}
}

View File

@@ -0,0 +1,27 @@
server {
root /home/{user}/www/{vhost}/web;
index app_dev.php;
server_name {vhost};
client_max_body_size 10M;
error_log /var/log/nginx/{vhost}.error.log;
access_log /var/log/nginx/{vhost}.access.log;
location / {
try_files $uri $uri/ /app_dev.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:{pool_port}
location ~ ^/(app|app_dev|check)\.php(/|$) {
fastcgi_pass 127.0.0.1:{pool_port};
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location ~ /\.ht {
deny all;
}
}