Commit f19eb67c authored by Falko Timme's avatar Falko Timme
Browse files

- nginx: moved phpMyAdmin and SquirrelMail aliases from ISPConfig vhost to apps vhost.

parent 3713dc82
......@@ -861,8 +861,8 @@ class installer_dist extends installer_base {
if($conf['nginx']['installed'] == true){
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
// Allow the ISPConfig vhost access to /etc/squirrelmail
$command = 'usermod -a -G '.$conf['apache']['group'].' ispconfig';
// Allow the ispapps vhost access to /etc/squirrelmail
$command = 'usermod -a -G '.$conf['apache']['group'].' ispapps';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
......
......@@ -653,7 +653,7 @@ class installer extends installer_base
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
$content = rf('tpl/php_fpm_pool.conf.master');
$content = rf('tpl/apps_php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'apps', $content);
$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_user}', $apps_vhost_user, $content);
......
......@@ -1483,7 +1483,7 @@ class installer_base {
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
$content = rf('tpl/php_fpm_pool.conf.master');
$content = rf('tpl/apps_php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'apps', $content);
$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_user}', $apps_vhost_user, $content);
......
[{fpm_pool}]
listen = 127.0.0.1:{fpm_port}
listen.allowed_clients = 127.0.0.1
user = {fpm_user}
group = {fpm_group}
pm = dynamic
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
chdir = /
php_admin_flag[magic_quotes_gpc] = off
\ No newline at end of file
......@@ -30,4 +30,42 @@ server {
location ~ /\. {
deny all;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /squirrelmail {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/squirrelmail/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /webmail {
rewrite ^/* /squirrelmail last;
}
}
\ No newline at end of file
......@@ -33,43 +33,43 @@ server {
deny all;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /squirrelmail {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/squirrelmail/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /webmail {
rewrite ^/* /squirrelmail last;
}
# location /phpmyadmin {
# root /usr/share/;
# index index.php index.html index.htm;
# location ~ ^/phpmyadmin/(.+\.php)$ {
# try_files $uri =404;
# root /usr/share/;
# include /etc/nginx/fastcgi_params;
# fastcgi_pass 127.0.0.1:{fpm_port};
# {ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $request_filename;
# }
# location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
# root /usr/share/;
# }
# }
# location /phpMyAdmin {
# rewrite ^/* /phpmyadmin last;
# }
#
# location /squirrelmail {
# root /usr/share/;
# index index.php index.html index.htm;
# location ~ ^/squirrelmail/(.+\.php)$ {
# try_files $uri =404;
# root /usr/share/;
# include /etc/nginx/fastcgi_params;
# fastcgi_pass 127.0.0.1:{fpm_port};
# {ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $request_filename;
# }
# location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
# root /usr/share/;
# }
# }
# location /webmail {
# rewrite ^/* /squirrelmail last;
# }
}
\ No newline at end of file
......@@ -30,4 +30,42 @@ server {
location ~ /\. {
deny all;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /squirrelmail {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/squirrelmail/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:{fpm_port};
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /webmail {
rewrite ^/* /squirrelmail last;
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment