Skip to content

Commit f19eb67

Browse files
committed
- nginx: moved phpMyAdmin and SquirrelMail aliases from ISPConfig vhost to apps vhost.
1 parent 3713dc8 commit f19eb67

File tree

7 files changed

+137
-43
lines changed

7 files changed

+137
-43
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,8 @@ public function install_ispconfig()
861861
if($conf['nginx']['installed'] == true){
862862
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
863863
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
864-
// Allow the ISPConfig vhost access to /etc/squirrelmail
865-
$command = 'usermod -a -G '.$conf['apache']['group'].' ispconfig';
864+
// Allow the ispapps vhost access to /etc/squirrelmail
865+
$command = 'usermod -a -G '.$conf['apache']['group'].' ispapps';
866866
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
867867
}
868868

install/dist/lib/gentoo.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ public function configure_apps_vhost()
653653

654654
// PHP-FPM
655655
// Dont just copy over the php-fpm pool template but add some custom settings
656-
$content = rf('tpl/php_fpm_pool.conf.master');
656+
$content = rf('tpl/apps_php_fpm_pool.conf.master');
657657
$content = str_replace('{fpm_pool}', 'apps', $content);
658658
$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
659659
$content = str_replace('{fpm_user}', $apps_vhost_user, $content);

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ public function configure_apps_vhost() {
14831483

14841484
// PHP-FPM
14851485
// Dont just copy over the php-fpm pool template but add some custom settings
1486-
$content = rf('tpl/php_fpm_pool.conf.master');
1486+
$content = rf('tpl/apps_php_fpm_pool.conf.master');
14871487
$content = str_replace('{fpm_pool}', 'apps', $content);
14881488
$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
14891489
$content = str_replace('{fpm_user}', $apps_vhost_user, $content);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[{fpm_pool}]
2+
3+
listen = 127.0.0.1:{fpm_port}
4+
5+
listen.allowed_clients = 127.0.0.1
6+
7+
user = {fpm_user}
8+
group = {fpm_group}
9+
10+
pm = dynamic
11+
pm.max_children = 50
12+
pm.start_servers = 20
13+
pm.min_spare_servers = 5
14+
pm.max_spare_servers = 35
15+
16+
chdir = /
17+
18+
php_admin_flag[magic_quotes_gpc] = off

install/tpl/nginx_apps.vhost.master

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,42 @@ server {
3030
location ~ /\. {
3131
deny all;
3232
}
33+
34+
location /phpmyadmin {
35+
root /usr/share/;
36+
index index.php index.html index.htm;
37+
location ~ ^/phpmyadmin/(.+\.php)$ {
38+
try_files $uri =404;
39+
root /usr/share/;
40+
include /etc/nginx/fastcgi_params;
41+
fastcgi_pass 127.0.0.1:{fpm_port};
42+
fastcgi_index index.php;
43+
fastcgi_param SCRIPT_FILENAME $request_filename;
44+
}
45+
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
46+
root /usr/share/;
47+
}
48+
}
49+
location /phpMyAdmin {
50+
rewrite ^/* /phpmyadmin last;
51+
}
52+
53+
location /squirrelmail {
54+
root /usr/share/;
55+
index index.php index.html index.htm;
56+
location ~ ^/squirrelmail/(.+\.php)$ {
57+
try_files $uri =404;
58+
root /usr/share/;
59+
include /etc/nginx/fastcgi_params;
60+
fastcgi_pass 127.0.0.1:{fpm_port};
61+
fastcgi_index index.php;
62+
fastcgi_param SCRIPT_FILENAME $request_filename;
63+
}
64+
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
65+
root /usr/share/;
66+
}
67+
}
68+
location /webmail {
69+
rewrite ^/* /squirrelmail last;
70+
}
3371
}

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,43 @@ server {
3333
deny all;
3434
}
3535

36-
location /phpmyadmin {
37-
root /usr/share/;
38-
index index.php index.html index.htm;
39-
location ~ ^/phpmyadmin/(.+\.php)$ {
40-
try_files $uri =404;
41-
root /usr/share/;
42-
include /etc/nginx/fastcgi_params;
43-
fastcgi_pass 127.0.0.1:{fpm_port};
44-
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
45-
fastcgi_index index.php;
46-
fastcgi_param SCRIPT_FILENAME $request_filename;
47-
}
48-
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
49-
root /usr/share/;
50-
}
51-
}
52-
location /phpMyAdmin {
53-
rewrite ^/* /phpmyadmin last;
54-
}
55-
56-
location /squirrelmail {
57-
root /usr/share/;
58-
index index.php index.html index.htm;
59-
location ~ ^/squirrelmail/(.+\.php)$ {
60-
try_files $uri =404;
61-
root /usr/share/;
62-
include /etc/nginx/fastcgi_params;
63-
fastcgi_pass 127.0.0.1:{fpm_port};
64-
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
65-
fastcgi_index index.php;
66-
fastcgi_param SCRIPT_FILENAME $request_filename;
67-
}
68-
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
69-
root /usr/share/;
70-
}
71-
}
72-
location /webmail {
73-
rewrite ^/* /squirrelmail last;
74-
}
36+
# location /phpmyadmin {
37+
# root /usr/share/;
38+
# index index.php index.html index.htm;
39+
# location ~ ^/phpmyadmin/(.+\.php)$ {
40+
# try_files $uri =404;
41+
# root /usr/share/;
42+
# include /etc/nginx/fastcgi_params;
43+
# fastcgi_pass 127.0.0.1:{fpm_port};
44+
# {ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
45+
# fastcgi_index index.php;
46+
# fastcgi_param SCRIPT_FILENAME $request_filename;
47+
# }
48+
# location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
49+
# root /usr/share/;
50+
# }
51+
# }
52+
# location /phpMyAdmin {
53+
# rewrite ^/* /phpmyadmin last;
54+
# }
55+
#
56+
# location /squirrelmail {
57+
# root /usr/share/;
58+
# index index.php index.html index.htm;
59+
# location ~ ^/squirrelmail/(.+\.php)$ {
60+
# try_files $uri =404;
61+
# root /usr/share/;
62+
# include /etc/nginx/fastcgi_params;
63+
# fastcgi_pass 127.0.0.1:{fpm_port};
64+
# {ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
65+
# fastcgi_index index.php;
66+
# fastcgi_param SCRIPT_FILENAME $request_filename;
67+
# }
68+
# location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
69+
# root /usr/share/;
70+
# }
71+
# }
72+
# location /webmail {
73+
# rewrite ^/* /squirrelmail last;
74+
# }
7575
}

server/conf/nginx_apps.vhost.master

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,42 @@ server {
3030
location ~ /\. {
3131
deny all;
3232
}
33+
34+
location /phpmyadmin {
35+
root /usr/share/;
36+
index index.php index.html index.htm;
37+
location ~ ^/phpmyadmin/(.+\.php)$ {
38+
try_files $uri =404;
39+
root /usr/share/;
40+
include /etc/nginx/fastcgi_params;
41+
fastcgi_pass 127.0.0.1:{fpm_port};
42+
fastcgi_index index.php;
43+
fastcgi_param SCRIPT_FILENAME $request_filename;
44+
}
45+
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
46+
root /usr/share/;
47+
}
48+
}
49+
location /phpMyAdmin {
50+
rewrite ^/* /phpmyadmin last;
51+
}
52+
53+
location /squirrelmail {
54+
root /usr/share/;
55+
index index.php index.html index.htm;
56+
location ~ ^/squirrelmail/(.+\.php)$ {
57+
try_files $uri =404;
58+
root /usr/share/;
59+
include /etc/nginx/fastcgi_params;
60+
fastcgi_pass 127.0.0.1:{fpm_port};
61+
fastcgi_index index.php;
62+
fastcgi_param SCRIPT_FILENAME $request_filename;
63+
}
64+
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
65+
root /usr/share/;
66+
}
67+
}
68+
location /webmail {
69+
rewrite ^/* /squirrelmail last;
70+
}
3371
}

0 commit comments

Comments
 (0)