diff --git a/README.md b/README.md index 00ff65f..f3d5afb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # vhost-stack -apt install apache php +## Install +``` +cd /usr/local/src/ +git clone https://git.stack-source.com/msb/vhost-stack.git +cd vhost-stack +bash install.sh +``` diff --git a/etc/apache2/mods-available/macro.conf b/etc/apache2/mods-available/macro.conf index b520ed3..3aadcdb 100644 --- a/etc/apache2/mods-available/macro.conf +++ b/etc/apache2/mods-available/macro.conf @@ -155,7 +155,7 @@ ServerName $vhost - DocumentRoot /srv/www/html/webmail/ + DocumentRoot /srv/www/html/roundcube/public_html SSLEngine on SSLCertificateFile /etc/ssl/letsencrypt/$vhost.pem diff --git a/install.sh b/install.sh index 6e8fc59..dc7579f 100755 --- a/install.sh +++ b/install.sh @@ -132,14 +132,46 @@ find /etc/varnish/ -type f -exec chmod 644 {} + chown -R root:root /etc/varnish/ ## /usr/bin/varnishncsa +# install vhost scripts +chmod 755 bin/* +cp bin/* /usr/local/bin/ + # mini_sendmail so users can send out of jails cd /usr/local/src wget http://www.acme.com/software/mini_sendmail/mini_sendmail-1.3.9.tar.gz -tar zxvf mini_sendmail-1.3.9.tar.gz +tar zxf mini_sendmail-1.3.9.tar.gz cd mini_sendmail-1.3.9/ make cp mini_sendmail /usr/local/sbin gzip mini_sendmail.8 cp mini_sendmail.8.gz /usr/local/share/man/man8 +# phpMyAdmin +apt -y install php-bz2 php-tcpdf +cd /usr/local/src +wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-all-languages.tar.gz +tar zxf phpMyAdmin-5.1.0-all-languages.tar.gz +cd phpMyAdmin-5.1.0-all-languages +rm -r phpMyAdmin-5.1.0-all-languages/setup/ phpMyAdmin-5.1.0-all-languages/test/ +blowfish_secret=`pwgen 32 -1` +echo ' phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "declare(strict_types=1);" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['blowfish_secret'] = '$blowfish_secret';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$i = 0;" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$i++;" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['Servers'][$i]['auth_type'] = 'cookie';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['Servers'][$i]['hide_db'] = 'information_schema|performance_schema|mysql';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['Servers'][$i]['host'] = '127.0.0.1';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['Servers'][$i]['compress'] = false;" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['Servers'][$i]['AllowNoPassword'] = false;" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['UploadDir'] = '';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['SaveDir'] = '';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['TempDir'] = '/tmp';" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +echo "\$cfg['PmaNoRelation_DisableWarning'] = true;" >> phpMyAdmin-5.1.0-all-languages/config.inc.php +mv phpMyAdmin-5.1.0-all-languages /srv/www/html/phpMyAdmin +## chown -R /srv/www/html/phpMyAdmin ??? + + + +