1
Market Places / Thread Closed
« on: 2018-12-13, 06:09:31 »
Thread Closed
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
###Start Kloxo PHP config Area
### begin content - please not remove this line
### MR -- using php version different with default php
### 1. Using suphp
### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
### then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
#<FilesMatch \.php$>
#SetHandler x-httpd-php
#SetHandler x-httpd-php52
#SetHandler x-httpd-php53
#SetHandler x-httpd-php54
#SetHandler x-httpd-php55
#SetHandler x-httpd-php56
#SetHandler x-httpd-php70
#</FilesMatch>
### OR
### 2. Using fcgid
### - Copy from '#Options' to '#FCGIWrapper' and
### then remove '#' for one of '#FCGIWrapper'
#Options +ExecCGI
#<FilesMatch \.php$>
# SetHandler fcgid-script
#</FilesMatch>
#FCGIWrapper /home/kloxo/client/php.fcgi .php
#FCGIWrapper /home/kloxo/client/php52.fcgi .php
#FCGIWrapper /home/kloxo/client/php53.fcgi .php
#FCGIWrapper /home/kloxo/client/php54.fcgi .php
#FCGIWrapper /home/kloxo/client/php55.fcgi .php
#FCGIWrapper /home/kloxo/client/php56.fcgi .php
#FCGIWrapper /home/kloxo/client/php70.fcgi .php
### end content - please not remove this line
###End Kloxo PHP config Area
### MR -- just enough remove # below for enable nginx cache
fastcgi_cache fcache;
#fastcgi_cache_valid 200 1h;
#fastcgi_cache_valid 301 1h;
#fastcgi_cache_valid 302 1h;
#fastcgi_cache_valid any 1m;
## for microcache
fastcgi_cache_valid 200 10s;
fastcgi_cache_use_stale updating;
fastcgi_max_temp_file_size 1M;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-Micro-Cache $upstream_cache_status;
## MR - increasing upload size to 64M (declare inside 'location /' not work
client_max_body_size 64M;
client_body_buffer_size 128k;
fastcgi_connect_timeout 600s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_request_buffering off;
### MR -- must be using nginx with including ngx_purge_cache
### must be using special nginx (nginx with ngx_purge_cache include
location ~ /purge(/.*) {
### MR -- just enough remove # below for enable purge_cache
#proxy_cache_purge pcache "$scheme://$host$1$request_method";
allow 127.0.0.1;
deny all;
}
### MR -- for userdir (access with http://ip/~user)
location ~ ^/~(.+?)(/.*)?$ {
if (!-f /home/$1/public_html/$2) {
rewrite ^ 404;
}
alias '/home/$1/public_html$2';
#autoindex on;
}
location ~ \.php$ {
try_files $uri =404;
#include fastcgi_params;
#fastcgi_pass 127.0.0.1:$var_fpmport;
fastcgi_pass unix:/opt/configs/php-fpm/sock/$var_phpselected-$var_user.sock;
fastcgi_index index.php;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param PHP_ADMIN_VALUE 'sendmail_path=/usr/sbin/sendmail -t -i';
fastcgi_param PHP_ADMIN_VALUE 'sendmail_from=$var_domain';
}
location / {
## MR -- move to ~lxcenter.conf
#limit_conn addr 25;
try_files $uri $uri/ /index.php;
}
location ~ ^/cgi-bin/.*\.(cgi|pl|py|rb) {
gzip off;
include fastcgi_params;
fastcgi_pass 127.0.0.1:$var_fpmport;
fastcgi_index cgi-bin.php;
fastcgi_param SCRIPT_FILENAME /home/httpd/cgi-bin.php;
fastcgi_param SCRIPT_NAME /cgi-bin/cgi-bin.php;
#fastcgi_param X_SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
fastcgi_param X_SCRIPT_FILENAME $var_rootdir$fastcgi_script_name;
fastcgi_param X_SCRIPT_NAME $fastcgi_script_name;
}