I have a Rails instance running on port 3001 on my machine and I want to proxy it through Apache on port 3002 letting Apache serve the static files located under
assets, so that
http://127.0.0.1:3002/some/action is served by Rails and
http://127.0.0.1:3002/assets/some_image.jpg is served by Apache itself.
The relevant parts of Apache's https.conf are:
Listen 3002 LoadModule alias_module modules/mod_alias.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule rewrite_module modules/mod_rewrite.so ProxyPass /assets ! Alias /assets "D:/temp/assets" ProxyRequests Off ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ <Location "/"> # Configurations specific to this location. Add what you need. # For instance, you can add mod_proxy_html directives to fix # links in the HTML code. See link at end of this page about using # mod_proxy_html. # Allow access to this proxied URL location for everyone. Order allow,deny Allow from all </Location> <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "D:/temp/assets"> # directives to effect the static directory # Options +Indexes Order deny,allow Allow from all </Directory>
While the dynamic pages are returned correctly, assets raise a 404-not found status. Any help? Thanks