Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 3 insertions
wheezy2jessie.sh
| @@ -103,6 +103,9 @@ APACHE2BASEDIR="/etc/apache2"; for CONF in $(ls -l ${APACHE2BASEDIR}/conf.d/ | g | |||
| 103 | 103 | CONF=$(basename ${CONF} .conf) | |
| 104 | 104 | a2enconf ${CONF} | |
| 105 | 105 | done | |
| 106 | + | # migrate standard Options config to valid one | |
| 107 | + | sed -i "s/Options ExecCGI/Options +ExecCGI/" /etc/apache2/sites-available/* | |
| 108 | + | ||
| 106 | 109 | # serveral changes may be needed to adjust content of config files | |
| 107 | 110 | # see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-apache2.0to2.4.md | |
| 108 | 111 | ||
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 3 insertions, 3 deletions
apache2.0to2.4.md
| @@ -12,6 +12,6 @@ see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-wheezy2jessie-sh | |||
| 12 | 12 | ||
| 13 | 13 | # Some more other handy resources | |
| 14 | 14 | ||
| 15 | - | https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 16 | - | https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 17 | - | http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
| 15 | + | https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 16 | + | https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 17 | + | http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 1 insertion, 1 deletion
apache2.0to2.4.md
| @@ -5,8 +5,8 @@ see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-wheezy2jessie-sh | |||
| 5 | 5 | # Upstream changes | |
| 6 | 6 | ||
| 7 | 7 | * [Order](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order), [Allow](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#allow), [Deny](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#deny) and [Satisfy](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#satisfy) are obsolete, you should read [Run-Time Configuration Changes](http://httpd.apache.org/docs/2.4/upgrading.html#run-time) or [Beyond just authorization](http://httpd.apache.org/docs/2.4/howto/auth.html#beyond) | |
| 8 | - | * Certificate handleing has changed, obsoletes [SSLCertificateChainFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile), please use [SSLCertificateFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile), it may also include intermediate CA certificates, sorted from leaf to root now | |
| 9 | 8 | * Mixing [Options](http://httpd.apache.org/docs/current/mod/core.html#options) with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort. | |
| 9 | + | * Certificate handleing has changed, obsoletes [SSLCertificateChainFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile), please use [SSLCertificateFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile), it may also include intermediate CA certificates, sorted from leaf to root now | |
| 10 | 10 | * Several other changes can be found in the [Upgrading to 2.4 from 2.2](http://httpd.apache.org/docs/2.4/upgrading.html) documentation | |
| 11 | 11 | ||
| 12 | 12 | ||
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
2 files changed, 20 insertions, 11 deletions
apache2.0to2.4.md(файл создан)
| @@ -0,0 +1,17 @@ | |||
| 1 | + | # Migrating the Apache config files into new places and naming scheme | |
| 2 | + | ||
| 3 | + | see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-wheezy2jessie-sh | |
| 4 | + | ||
| 5 | + | # Upstream changes | |
| 6 | + | ||
| 7 | + | * [Order](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order), [Allow](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#allow), [Deny](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#deny) and [Satisfy](http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#satisfy) are obsolete, you should read [Run-Time Configuration Changes](http://httpd.apache.org/docs/2.4/upgrading.html#run-time) or [Beyond just authorization](http://httpd.apache.org/docs/2.4/howto/auth.html#beyond) | |
| 8 | + | * Certificate handleing has changed, obsoletes [SSLCertificateChainFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile), please use [SSLCertificateFile](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile), it may also include intermediate CA certificates, sorted from leaf to root now | |
| 9 | + | * Mixing [Options](http://httpd.apache.org/docs/current/mod/core.html#options) with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort. | |
| 10 | + | * Several other changes can be found in the [Upgrading to 2.4 from 2.2](http://httpd.apache.org/docs/2.4/upgrading.html) documentation | |
| 11 | + | ||
| 12 | + | ||
| 13 | + | # Some more other handy resources | |
| 14 | + | ||
| 15 | + | https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 16 | + | https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 17 | + | http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
wheezy2jessie.sh
| @@ -88,17 +88,7 @@ sed -i s/^startup=0/startup=1/ /etc/default/shorewall | |||
| 88 | 88 | aptitude full-upgrade | |
| 89 | 89 | ||
| 90 | 90 | # Apache2 config migration | |
| 91 | - | # can be done via https://gist.github.com/waja/9c6ca010bf44b7a6f99c/raw/migrate_apache22to24.sh | |
| 92 | - | # or sites transition with /usr/share/doc/apache2/migrate-sites.pl | |
| 93 | - | # | |
| 94 | - | # More info in /usr/share/doc/apache2/NEWS.Debian.gz | |
| 95 | - | # Upstream authorization changes: http://httpd.apache.org/docs/2.4/upgrading.html#run-time | |
| 96 | - | # https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 97 | - | # https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 98 | - | # http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
| 99 | - | # | |
| 100 | - | # Certificate handleing has changed, obsoletes SSLCertificateChainFile: | |
| 101 | - | # http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile | |
| 91 | + | # see also /usr/share/doc/apache2/NEWS.Debian.gz | |
| 102 | 92 | # | |
| 103 | 93 | # migrate sites into new naming scheme | |
| 104 | 94 | perl /usr/share/doc/apache2/migrate-sites.pl | |
| @@ -113,6 +103,8 @@ APACHE2BASEDIR="/etc/apache2"; for CONF in $(ls -l ${APACHE2BASEDIR}/conf.d/ | g | |||
| 113 | 103 | CONF=$(basename ${CONF} .conf) | |
| 114 | 104 | a2enconf ${CONF} | |
| 115 | 105 | done | |
| 106 | + | # serveral changes may be needed to adjust content of config files | |
| 107 | + | # see https://gist.github.com/waja/86a3a055c1fedfba3c58#file-apache2.0to2.4.md | |
| 116 | 108 | ||
| 117 | 109 | # remove old squeeze packages left around (keep eyes open!) | |
| 118 | 110 | apt-get autoremove | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 4 insertions
wheezy2jessie.sh
| @@ -66,6 +66,10 @@ sed -i "s/^ rocommunity public/# rocommunity public/" $CFG | |||
| 66 | 66 | sed -i "s/^ rocommunity6 public/# rocommunity6 public/" $CFG | |
| 67 | 67 | sed -i "s/agentAddress udp:127/#agentAddress udp:127/" $CFG | |
| 68 | 68 | ||
| 69 | + | # chrony update | |
| 70 | + | if [ -f /etc/chrony/chrony.conf.new ]; then CFG=/etc/chrony/chrony.conf.new; else CFG=/etc/chrony/chrony.conf; fi | |
| 71 | + | sed -i s/debian.pool/de.pool/g $CFG | |
| 72 | + | ||
| 69 | 73 | # randomize crontab | |
| 70 | 74 | if [ -f /etc/crontab.dpkg-new ]; then CFG=/etc/crontab.dpkg-new; else CFG=/etc/crontab; fi | |
| 71 | 75 | sed -i 's#root cd#root perl -e "sleep int(rand(300))" \&\& cd#' $CFG | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 3 insertions
wheezy2jessie.sh
| @@ -93,6 +93,9 @@ aptitude full-upgrade | |||
| 93 | 93 | # https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 94 | 94 | # http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
| 95 | 95 | # | |
| 96 | + | # Certificate handleing has changed, obsoletes SSLCertificateChainFile: | |
| 97 | + | # http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatefile | |
| 98 | + | # | |
| 96 | 99 | # migrate sites into new naming scheme | |
| 97 | 100 | perl /usr/share/doc/apache2/migrate-sites.pl | |
| 98 | 101 | # migrate server config snippets into new directory | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 11 insertions
wheezy2jessie.sh
| @@ -95,6 +95,17 @@ aptitude full-upgrade | |||
| 95 | 95 | # | |
| 96 | 96 | # migrate sites into new naming scheme | |
| 97 | 97 | perl /usr/share/doc/apache2/migrate-sites.pl | |
| 98 | + | # migrate server config snippets into new directory | |
| 99 | + | APACHE2BASEDIR="/etc/apache2"; for CONF in $(ls -l ${APACHE2BASEDIR}/conf.d/ | grep -v ^l | awk {'print $9'} | grep -v ^$); do | |
| 100 | + | if ! [ ${CONF##*.} == "conf" ]; then | |
| 101 | + | mv ${APACHE2BASEDIR}/conf.d/${CONF} ${APACHE2BASEDIR}/conf.d/${CONF}.conf | |
| 102 | + | CONF="${CONF}.conf" | |
| 103 | + | fi | |
| 104 | + | mv ${APACHE2BASEDIR}/conf.d/${CONF} ${APACHE2BASEDIR}/conf-available/${CONF} | |
| 105 | + | # enable this | |
| 106 | + | CONF=$(basename ${CONF} .conf) | |
| 107 | + | a2enconf ${CONF} | |
| 108 | + | done | |
| 98 | 109 | ||
| 99 | 110 | # remove old squeeze packages left around (keep eyes open!) | |
| 100 | 111 | apt-get autoremove | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 3 insertions
wheezy2jessie.sh
| @@ -92,6 +92,9 @@ aptitude full-upgrade | |||
| 92 | 92 | # https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 93 | 93 | # https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 94 | 94 | # http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
| 95 | + | # | |
| 96 | + | # migrate sites into new naming scheme | |
| 97 | + | perl /usr/share/doc/apache2/migrate-sites.pl | |
| 95 | 98 | ||
| 96 | 99 | # remove old squeeze packages left around (keep eyes open!) | |
| 97 | 100 | apt-get autoremove | |
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 1 insertion, 1 deletion
wheezy2jessie.sh
| @@ -99,7 +99,7 @@ aptitude search ?obsolete | |||
| 99 | 99 | dpkg -l | grep etch | grep -v xen | grep -v unbound | grep -v finch | awk '{print $2}' | xargs aptitude -y purge | |
| 100 | 100 | dpkg -l | grep lenny | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 101 | 101 | dpkg -l | grep squeeze | grep -v xen | awk '{print $2}' | xargs aptitude -y purge | |
| 102 | - | dpkg -l | grep wheezy | grep -v xen | grep -v linux-image | awk '{print $2}' | xargs aptitude -y purge | |
| 102 | + | dpkg -l | grep -E 'deb7|wheezy' | grep -v xen | grep -v linux-image | awk '{print $2}' | xargs aptitude -y purge | |
| 103 | 103 | aptitude -y install deborphan && deborphan | grep -v xen | grep -v libpam-cracklib | xargs aptitude -y purge | |
| 104 | 104 | dpkg -l | grep ^r | awk '{print $2}' | xargs aptitude -y purge | |
| 105 | 105 | ||
Jan Wagner ревизий этого фрагмента 10 years ago. К ревизии
1 file changed, 6 insertions, 1 deletion
wheezy2jessie.sh
| @@ -86,7 +86,12 @@ aptitude full-upgrade | |||
| 86 | 86 | # Apache2 config migration | |
| 87 | 87 | # can be done via https://gist.github.com/waja/9c6ca010bf44b7a6f99c/raw/migrate_apache22to24.sh | |
| 88 | 88 | # or sites transition with /usr/share/doc/apache2/migrate-sites.pl | |
| 89 | + | # | |
| 89 | 90 | # More info in /usr/share/doc/apache2/NEWS.Debian.gz | |
| 91 | + | # Upstream authorization changes: http://httpd.apache.org/docs/2.4/upgrading.html#run-time | |
| 92 | + | # https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax | |
| 93 | + | # https://www.linode.com/docs/security/upgrading/updating-virtual-host-settings-from-apache-2-2-to-apache-2-4 | |
| 94 | + | # http://linoxide.com/linux-how-to/apache-migration-2-2-to-2-4-ubuntu-14-04/ | |
| 90 | 95 | ||
| 91 | 96 | # remove old squeeze packages left around (keep eyes open!) | |
| 92 | 97 | apt-get autoremove | |
| @@ -120,4 +125,4 @@ dpkg -l | grep ^r | awk '{print $2}' | xargs aptitude -y purge | |||
| 120 | 125 | # /etc/php5/mods-available/local-expose.ini && php5enmod local-expose/90 | |
| 121 | 126 | # migrate local suhosin config | |
| 122 | 127 | #find /etc/php5/conf.d/ -type f -name "*suhosin.ini" -exec mv '{}' \ | |
| 123 | - | # /etc/php5/mods-available/local-suhosin.ini \; && php5enmod local-suhosin/90 | |
| 128 | + | # /etc/php5/mods-available/local-suhosin.ini \; && php5enmod local-suhosin/90 | |