How do I prepare my VPS site for Debian Stretch?

The following provides information to help you prepare your website for Debian Stretch.

What is changing?

Any new private server purchased after March 9th, 2020 runs the operating system Debian Stretch. The former operating system was Ubuntu 14 (Trusty).

What to expect

DreamHost will contact you via email in advance of the upgrade.

The time frame of an upgrade can vary from server to server, however the timing ensures that there are several highly trained engineers on hand should any major issues arise. The upgrade itself should take no longer than an hour to complete.

Legacy VPS with admin/sudo users

Even though you'll still have admin/sudo access to make any changes to your VPS following the upgrade, the upgrade to Stretch may not be compatible for your current needs. For example, the following changes may affect your current setup:

  • PHP version is upgrading to 7.2.
  • Any changes made outside your /home directory will not be retained. DreamHost recommends making note of any system changes you've made with your admin/sudo user, including backing up any data and/or configuration files stored outside of /home.
  • If you're using Ruby, Python, or run a site that relies heavily on specific server packages, DreamHost strongly recommends reading through this entire article for specific details about preparing for the upgrade.

You can also consider the following options if you need to more control over your server environment after the upgrade to Stretch:

  • Since the PHP version on your server will be upgraded to 7.2, you can upgrade to a Dedicated Server, which will still be able to use PHP 5.6 for the foreseeable future.
  • If you rely on a highly customized setup and want full control over your software upgrades, DreamHost recommends DreamCompute as it provides a more elastic cloud computing solution, which is ideal for fully unmanaged environments.
  • If you aren't sure or wish to discuss a viable solution further, feel free to Contact Support.

MySQL

Server changes

DreamHost VPS MySQL servers will be upgraded to MySQL version 5.7 as part of the Debian Stretch upgrade.

Reserved words

MySQL 5.7 includes a list of "reserved words" (such as 'SELECT', 'DELETE', 'BIGINT', and 'VIRTUAL') that cannot be used as a database name. These words can be used as a database table name, but must be escaped in database queries. Reserved words in MySQL 5.7 require special treatment for use as identifiers, such as table and column names.

See the following article for more information on how to use reserved words in MySQL 5.7:

Web server changes

Apache version change (from 2.2 to 2.4)

Apache is upgrading to version 2.4 (from 2.2). Although this should not cause any major issues to your hosting environment, you can view a list of changes in the following article:

require valid-user

If you're using an .htaccess file to password protect your site, make sure you add this line to your .htaccess file:

require valid-user

If you do not add this, your site will throw a 500 error and the following line will display in your site's error.log:

AH01627: AuthType configured with no corresponding authorization directives

'Coming soon' page displays even though it doesn't exist

You may see your site displaying a 'Coming Soon' page that does not exist on your web server. Add the following line to your site's .htaccess file to resolve this.

DirectoryIndex disabled

WebDAV file listing hidden if index is present

On Apache 2.4, you must add the following text to the .htaccess file in order to access the directory of an index file using WebDAV (not a browser), since it won't show the file list in Windows Explorer:

DirectoryIndex disabled

Boto-rsync

Because boto-rsync is outdated software and is no longer maintained, it is also removed from the latest version of Debian Stretch. DreamHost recommends using S3cmd or AWS CLI instead. You can find out more about how to use S3cmd or AWS CLI in the following articles:

curl version changed to 7.52.1

The version of curl changed from 7.35.0 to 7.52.1.

FFmpeg and Libav

In Ubuntu 14 (Trusty), Libav replaced FFmpeg, and FFmpeg was removed from Trusty entirely. With the Debian Stretch upgrade, this is being reversed: FFmpeg is back, and Libav has been removed. Please make sure you update your file settings accordingly.

FilterProvider syntax change

In Apache 2.4, the syntax for FilterProvider has changed.

Sample old version:

FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html

Sample new version:

FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"

You can read more about this in the Apache 2.4 mod_filter documentation:

Java version change (from 7u151 to 8u242)

Debian Stretch includes a new version of Java version 8, 8u242.

This is the first major upgrade in quite some time, so it's definitely a good idea to make sure any Java dependencies you may have are compatible with version 8.

For more information on the latest versions of Java, visit the following link:

OpenSSL version change (1.0.1f to 1.1.0l)

Debian Stretch includes version 1.1.0l of OpenSSL.

Passenger

To enable Passenger error-friendly pages (which helps troubleshoot upgrade issues), add the following to an .htaccess file within the application:

PassengerFriendlyErrorPages on

Perl version change (from 5.18.4 to 5.24.1)

Debian Stretch includes a new version of Perl, 5.24.1. Among the many changes, this update removes the current directory (".") from @INC for security reasons. You can read about this in more detail here.

For more information on updating your version of Perl, visit the following article:

PHP error logging

PHP errors are logged in your site's error.log file by default. You change which errors are reported and the location of where they are reported by updating your site's phprc file. View the following article for further details:

Python version changes

The following Python versions are changing:

  • Version upgrade from Python 2.7.13 to 3.5.3

Since Debian Stretch includes a new kernel and operating system, it no longer supports custom compiled versions of Python older than 2.7.15. If you are running an application that uses a version of Python that is older than 2.7.15, you must upgrade your code so it is compatible with at least 2.7.15 when applicable.

If you need to use an older-than-2.7.15 version of Python, you can consider using DreamCompute to set up a customized environment that allows sudo access. For more information on DreamCompute, please see the following article:

If you used a version older than 2.7.15 when creating your virtualenv, you may need to reinstall your virtualenv and all modules with a newer version:

For more information on the latest versions of Python, visit the following links:

Python Django errors

After the upgrade, you may see errors in your Django application. For example.

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared object file: No such file or directory.
Did you install mysqlclient or MySQL-python?

Solution

Delete your pip .cache directory.

Python virtual environment

If your website is using a Python virtual environment and you notice any errors after the upgrade, reinstall your virtual environment and all modules. This helps to ensure everything is compatible with the new libraries on the server.

Examples of errors you may see are Django, Passenger, or Python errors/warnings.

Ruby version 2.7.0

The Ruby version on the server is 2.7.0. If you would like more control over this, DreamHost strongly recommends using RVM.

If you are using Bundler, you only need to run:

[server]$ bundle exec gem pristine

Then, reload passenger so that the changes take effect by touching a restart.txt file from your apps 'tmp' directory:

[server]$ touch  tmp/restart.txt

SSH version change to 7.4p1 (no dsa keys)

The version of SSH on Debian servers is 7.4p1. Please note that DSA keys are not available on this version.

Nginx PHP versions

The following PHP versions are available on Nginx machines:

  • 7.2
  • 7.3
  • 7.4

How can I find support?

If you have any questions or concerns, please feel free to contact support.

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?