I have a proxy redirect problem with apache 2.4 running on a docker container debian:jessie.
I have a server configured like:
<Directory "{{SERVER_ROOT}}">
Options Indexes FollowSymLinks
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
And a .htaccess rule:
# Redirect crawlers to prerender (crawl)
RewriteCond %{HTTP_USER_AGENT} !^Prerender
RewriteCond %{HTTP_USER_AGENT} (Google|facebookexternalhit/1.1|Facebot|facebookexternalhit|Googlebot|bingbot|Googlebot-Mobile) [NC]
RewriteCond %{QUERY_STRING} _escaped_fragment_|prerender=1
RewriteRule ^ http://prerender:3000/https://demo.mysite.com%{REQUEST_URI} [P,L]
When calling the prerender server:
curl -k -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://demo.mysite.com/\?_escaped_fragment_\=/scan-f
I get the following error in apache-ssl-error.log:
[Fri Dec 04 16:21:38.346574 2015] [core:error] [pid 14] (2)No such file or directory: [client 10.0.9.156:39937] AH00132: file permissions deny server access: proxy:http://prerender:3000/https://demo.mysite.com/index.php?_escaped_fragment_=/scan-f
I have checked and all relevant files have user and group apache. Prerender server is accesible from debian, and calling the proxy url directly works. Also, all the site is accessible from the browser, but not for the redirect.
Any idea what I am doing wrong?
Thanks!
So I got it working in the end. I had to install and enable mod_proxy: