Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m having a similar issue as the user here. I’m running an Ubuntu 14.04.4 droplet and using Apache2 for the webserver.
My current redirect setup goes like this:
worksworksworksERROR The last one is where the problem is. For some reason, my permanent HTTP to HTTPS redirect fails if a subdirectory or file is also part of the URL. On Chrome, I get redirected to a ERR_CONNECTION_REFUSED page for example.comdoesnt-exist (obviously not a real domain) over HTTPS. For that last case, I want to have it arrive at my catch-all 404 page over HTTPS.
Here’s my 000-default.conf file (I’m not using an .htaccess file):
<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile <location here>
SSLCertificateKeyFile <location here>
SSLCACertificateFile <location here>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorDocument 404 /404.html
ErrorDocument 400 /400.html
</VirtualHost>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
I’m a newbie at this so there’s probably an embarassing mistake in here
I greatly appreciate any help!
gerard
Jon Harris
orbitstorm88
rem3n
yolanda smith
301276acdc124dd982fe86364ba8c4
30ddab6038c044188d489290785dcb
699c9bc0a2c34f248e792cb8d2c6ab
Kent Morlan
sylvaticus
agitechcr
8b8f3c8ea96345bf8ddb0a59a008e2