Apache is serving an .svg
file, but the HTTP response does not have a Content-type
header. Consequently, Chrome is displaying the text of the .svg
file, rather than the desired image.
My goal is for Apache to serve the .svg
file with the header Content-type: image/svg+xml
so that Chrome will display the image.
Aside: The .svg
file originally came from here:
https://s3-us-west-2.amazonaws.com/s.cdpn.io/106114/bee.svg
My Apache configuration file is intentionally as small as possible. It is:
DocumentRoot /path/to/docroot
ErrorLog /tmp/apache.log
PidFile /tmp/apache.pid
Listen 0.0.0.0:8000
ServerName 127.0.0.1
LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
TypesConfig /etc/mime.types
AddType image/svg+xml .svg
I am running Apache as provided by Ubuntu 20.04 (version 2.4.41-4ubuntu3
).
My question is, what configuration changes will cause Apache to provide the desired Content-type
header for the .svg
file?