Symlink
If you are on a linux box then you can use a symlink to alias all the entire httpdocs folder to the https
directory.
ln -s /var/www/vhosts/example.org/httpdoc /var/www/vhosts/example.org/httpsdoc
This is described as
ln -s source_file link_name
This way everything that is in httpdocs is available to the server via httpsdocs as well without copying anything. Obviously if you do not wish to symlink the whole lot you could just symlink your images directory.
You can use this on a box where you are unable to update the virtual host container.
Change the virtual host configuration
This will of course cause all access to both http and https to access the files from the same document root directory.
Change you vhost configuration to be:
# Virtual Hosting
<VirtualHost *:80>
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
Include /etc/apache2/server-vhost.conf
</VirtualHost>
# SSL Virtual Hosting
<VirtualHost *:443>
<IfModule mod_ssl.c>
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
</IfModule>
Include /etc/apache2/server-vhost.conf
</VirtualHost>
Then create /etc/apache2/server-vhost.conf
as referenced by the Include
lines in the two vhost configurations above:
ServerName example.org
ServerAdmin example@example.org
DocumentRoot /var/www/vhosts/example.org/httpdoc