3

I'm trying to configure Apache HTTP server 2.4 as a reverse proxy on RHEL 7 server. When Apache starts up it complains in its log file (/var/log/httpd/error_log):

 AH01597: could not open mime types config file /etc/httpd/conf/mime.types.

I'm surprised it cares about MIME types, as I do not want it to serve files from the file-system at all. How can I configure Apache HTTP server so it does not demand a mime types configuration or which additional packages (RPMs) do I need to install to provide correct MIME types information.

2

3 Answers 3

0

I had based my Apache configuration file on the example that Red Hat provided. I included the command

 Include conf.modules.d/00-base.conf

as I thought leaving out any base modules would lead to Bad Things.

But the Red Hat supplied conf.modules.d/00-base.conf files loads numerous modules, few of which are required for a reverse proxy. In particular, it loads the mod_mime module, which needs a MIME types configuration file.

Replacing that Include command with individual LoadModule commands for the few modules I need eliminated the problem.

0

As @ezra-s mentioned mime.types file should come with installation. For my case it is located at /etc directory. So I just solved the same problem by copying the mime.types files from /etc directory to /etc/httpd/conf/

0

This could be caused by setting the wrong ServerRoot - do not confuse it (as I did) with DocumentRoot.

  • ServerRoot - apache installation dir (and base dir for related logs, pidfiles, or mime.types etc.)
  • DocumentRoot - web dir

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .