Skip to content

Commit

Permalink
fix 'fastcgi pass' for '/__kloxo' in lighttpd; fix passing timeout va…
Browse files Browse the repository at this point in the history
…lue (bug?) in nginx; fix include declare in domains.conf.tpl for lighttpd
  • Loading branch information
mustafaramadhan committed May 20, 2016
1 parent 5358fb6 commit b26260e
Show file tree
Hide file tree
Showing 13 changed files with 200 additions and 39 deletions.
2 changes: 1 addition & 1 deletion kloxo/bin/kloxoversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0.b-2016052004
7.0.0.b-2016052101
4 changes: 2 additions & 2 deletions kloxo/file/lighttpd/tpl/domains.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -911,13 +911,13 @@ if ($redirectionremote) {
if ($enablephp) {
?>
include '<?php echo $globalspath; ?>/php-fpm_standard.conf';
include "<?php echo $globalspath; ?>/php-fpm_standard.conf"
<?php
}
} else {
?>
include '<?php echo $globalspath; ?>/switch_standard.conf';
include "<?php echo $globalspath; ?>/switch_standard.conf"
<?php
}
}
Expand Down
3 changes: 2 additions & 1 deletion kloxo/file/nginx/conf/globals/generic.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
location ~ ^/__kloxo/(.*)$ {
alias /home/$var_user/kloxoscript/$1;

fastcgi_pass 127.0.0.1:$var_fpmport;
#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 SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/php-fpm_standard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

fastcgi_connect_timeout $var_timeout;
fastcgi_send_timeout $var_timeout;
fastcgi_read_timeout $var_timeout;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;

Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/php-fpm_standard_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

fastcgi_connect_timeout $var_timeout;
fastcgi_send_timeout $var_timeout;
fastcgi_read_timeout $var_timeout;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;

Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/php-fpm_wildcards.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

fastcgi_connect_timeout $var_timeout;
fastcgi_send_timeout $var_timeout;
fastcgi_read_timeout $var_timeout;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;

Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/php-fpm_wildcards_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

fastcgi_connect_timeout $var_timeout;
fastcgi_send_timeout $var_timeout;
fastcgi_read_timeout $var_timeout;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;

Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/proxy_standard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

proxy_connect_timeout $var_timeout;
proxy_send_timeout $var_timeout;
proxy_read_timeout $var_timeout;
#proxy_buffers 32 4k;
proxy_buffers 8 128k;
proxy_buffer_size 128k;
Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/proxy_standard_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

proxy_connect_timeout $var_timeout;
proxy_send_timeout $var_timeout;
proxy_read_timeout $var_timeout;
#proxy_buffers 32 4k;
proxy_buffers 8 128k;
proxy_buffer_size 128k;
Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/proxy_wildcards.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

proxy_connect_timeout $var_timeout;
proxy_send_timeout $var_timeout;
proxy_read_timeout $var_timeout;
#proxy_buffers 32 4k;
proxy_buffers 8 128k;
proxy_buffer_size 128k;
Expand Down
3 changes: 0 additions & 3 deletions kloxo/file/nginx/conf/globals/proxy_wildcards_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
client_max_body_size 64M;
client_body_buffer_size 128k;

proxy_connect_timeout $var_timeout;
proxy_send_timeout $var_timeout;
proxy_read_timeout $var_timeout;
#proxy_buffers 32 4k;
proxy_buffers 8 128k;
proxy_buffer_size 128k;
Expand Down
18 changes: 17 additions & 1 deletion kloxo/file/nginx/tpl/defaults.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,23 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';

<?php
if ($reverseproxy) {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
<?php
Expand Down
188 changes: 178 additions & 10 deletions kloxo/file/nginx/tpl/domains.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -256,7 +273,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -308,7 +342,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -402,7 +453,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -567,9 +635,25 @@ server {
set $var_user '<?php echo $user; ?>';
set $var_fpmport '<?php echo $fpmport; ?>';
set $var_phpselected '<?php echo $phpselected; ?>';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}

if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
if ($enablestats) {
?>
Expand Down Expand Up @@ -745,8 +829,24 @@ server {
set $var_user '<?php echo $user; ?>';
set $var_fpmport '<?php echo $fpmport; ?>';
set $var_phpselected '<?php echo $phpselected; ?>';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}

if (($reverseproxy) && ($webselected === 'front-end')) {
?>
Expand Down Expand Up @@ -883,7 +983,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -980,7 +1097,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -1049,7 +1183,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down Expand Up @@ -1144,7 +1295,24 @@ server {
set $var_user 'apache';
set $var_fpmport '<?php echo $fpmportapache; ?>';
set $var_phpselected 'php';
set $var_timeout '<?php echo $timeout; ?>s';
<?php
if ((!$reverseproxy) || (($reverseproxy) && ($webselected === 'front-end'))) {
?>
fastcgi_connect_timeout <?php echo $timeout; ?>s;
fastcgi_send_timeout <?php echo $timeout; ?>s;
fastcgi_read_timeout <?php echo $timeout; ?>s;
<?php
} else {
?>
proxy_connect_timeout <?php echo $timeout; ?>s;
proxy_send_timeout <?php echo $timeout; ?>s;
proxy_read_timeout <?php echo $timeout; ?>s;
<?php
}
?>

include '<?php echo $globalspath; ?>/switch_standard<?php echo $switches[$count]; ?>.conf';
}
Expand Down

0 comments on commit b26260e

Please sign in to comment.