Prerender.io & Dreamhost VPS reverse proxy issue

vps

#1

Hello all,

I am having a difficult time getting prerender.io to work properly with my AngularJS web application on a Dreamhost VPS.

Prerender leverages a reverse proxy and is intended to render client rendering applications and create a version such that the search engines can crawl.
https://prerender.io/

Set-up:
.htaccess

[code]
RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R,L]

RequestHeader set X-Prerender-Token "xxxxxxxxxxxxxxxxxxxxxxx" RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR] RewriteCond %{QUERY_STRING} _escaped_fragment_
    # Only proxy the request to Prerender if it's a request for HTML
    RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff))(.*) http://service.prerender.io/https://www.mydomain.com/$2 [P,L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

If the requested resource doesn’t exist, use index.html

RewriteRule ^ /index.html[/code]

Troubleshooting:
I was asked to ensure mod_proxy_http.c and mod_headers.c are enabled… which I did by executing command

…and saw both “mod_proxy_http.so” and “mod_headers.so” listed which apparently serves as validation.

I was told by prerender I would not need to “Set Up A Proxy Server Port:” using the Dreamhost “Mongrel and Proxy” panel. This seems odd to me.

If I were to “Set Up A Proxy Server Port:” it is unclear what port I would use… possibly there would be a corresponding port number entry in the .htaccess file?

Result

No such file or directory: file permissions deny server access: proxy:http://service.prerender.io/https://www.mydomain.com/index.html

Attempt to serve directory: proxy:http://service.prerender.io/https://www.mydomain.com/?escaped_fragment=

Any advice is greatly appreciated?


#2

Did you find any resolution to the above query?


#3

since this thread is quite old and no response is here, I’d suggest you start by giving out the details of your issue, as things may be quite different.