Advertisement
Saddler

config

Nov 13th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. Listen 8080
  2. ServerName app
  3. ServerSignature Off
  4. ServerTokens Prod
  5. ErrorLog '/dev/stderr'
  6.  
  7. <VirtualHost *:8080>
  8. DocumentRoot "/opt/app/dist/"
  9. CustomLog '/dev/stdout' combined
  10.  
  11. SSLProxyEngine on
  12.  
  13. <Directory /opt/app/dist>
  14. Require all granted
  15.  
  16. RewriteEngine On
  17.  
  18. RewriteCond %{REQUEST_URI} !^/$
  19. RewriteCond %{REQUEST_URI} !^/index.html$
  20. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
  21. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
  22. RewriteRule ^ - [L]
  23.  
  24. RequestHeader set X-Prerender-Token "dXMtd2VzdC0yOjU4ODNiNWM1LWUzNjUtNDlkZC04Zjc3LThjOTVmYmIwYjIxOQ.TgO3TXRVMkirzlxSVv4EbRHkHT-byejFIoBrXZVoKWw"
  25.  
  26. # RewriteCond %{HTTP_USER_AGENT} googlebot|yahoo|bingbot|baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator|redditbot|Applebot|WhatsApp|flipboard|tumblr|bitlybot [NC,OR]
  27. # RewriteCond %{QUERY_STRING} _escaped_fragment_
  28. # Header append Vary User-Agent
  29.  
  30. RewriteCond %{HTTP_USER_AGENT} !prerendercloud [NC]
  31. RewriteRule ^(.*)$ http://service.prerender.cloud/%{REQUEST_SCHEME}://%{HTTP_HOST}/$1 [P,L]
  32.  
  33. RewriteRule ^ index.html
  34. </Directory>
  35. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement