z
This commit is contained in:
51
update/data/templates/nginx_php.conf
Normal file
51
update/data/templates/nginx_php.conf
Normal file
@@ -0,0 +1,51 @@
|
||||
|*if HAVE_PHP1_FPM="1"|
|
||||
# use fastcgi for all php files
|
||||
location ~ \.php$
|
||||
{
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
if ( $skip_cache ~ "^$" ) {
|
||||
set $skip_cache 1;
|
||||
}
|
||||
fastcgi_cache_bypass $skip_cache;
|
||||
fastcgi_no_cache $skip_cache;
|
||||
fastcgi_cache FASTCGICACHE;
|
||||
fastcgi_cache_valid 60m;
|
||||
add_header X-FastCGI-Cache $upstream_cache_status;
|
||||
include /etc/nginx/nginx_limits.conf;
|
||||
|
||||
if (-f $request_filename)
|
||||
{
|
||||
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock;
|
||||
}
|
||||
}
|
||||
|*endif|
|
||||
|*if HAVE_PHP2_FPM="1"|
|
||||
# use fastcgi for all php files
|
||||
location ~ \.php|PHP2_RELEASE|$
|
||||
{
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
if ( $skip_cache ~ "^$" ) {
|
||||
set $skip_cache 1;
|
||||
}
|
||||
fastcgi_cache_bypass $skip_cache;
|
||||
fastcgi_no_cache $skip_cache;
|
||||
fastcgi_cache FASTCGICACHE;
|
||||
fastcgi_cache_valid 60m;
|
||||
add_header X-FastCGI-Cache $upstream_cache_status;
|
||||
include /etc/nginx/nginx_limits.conf;
|
||||
|
||||
|
||||
if (-f $request_filename)
|
||||
{
|
||||
fastcgi_pass unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock;
|
||||
}
|
||||
}
|
||||
|*endif|
|
||||
Reference in New Issue
Block a user