0

Here's my vhost in apache 2.4:

<VirtualHost *:80> ServerName mailcatcher.dev Alias /mailcatcher.dev.png /Users/me/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mailcatcher-0.5.12/public/images/logo_large.png <Directory /Users/me/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mailcatcher-0.5.12/public/images> Order allow,deny Allow from all </Directory> ErrorLog "/private/var/log/apache2/mailcatcher.dev-error_log" CustomLog "/private/var/log/apache2/mailcatcher.dev-access_log" common ProxyPass / http://127.0.0.1:1080/ ProxyPassReverse / http://127.0.0.1:1080/ </VirtualHost> 

I'm trying to have the one url http://mailcatcher.dev/mailcatcher.dev.png resolve to a file and all other requests be forwarded to the webmail interface. Allegedly my config is fine according to apachectl -t; but the file isn't served and a 404 (below) shows up in my access log (nothing in the error log).

::1 - - [18/Sep/2014:22:42:07 -0600] "GET /mailcatcher.dev.png HTTP/1.1" 404 135 

What am I not getting here? This should work according to the spec where it says that the alias can resolve to a file-path.

1 Answer 1

4

This is because the request to /mailcatcher.dev.png is being reverse proxied to your backend application as the ProxyPass directive appear to take higher precedence than Alias

You need to add a ProxyPass /mailcatcher.dev.png ! entry before ProxyPass / http://127.0.0.1:1080/

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.