Advertisement
Guest User

Untitled

a guest
Jul 7th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. cat rewrite-to-plone.conf
  2. UseCanonicalName On
  3. #NameVirtualHost *
  4.  
  5. <VirtualHost *>
  6.  
  7. ServerSignature On
  8.  
  9. Header set X-Frame-Options "SAMEORIGIN"
  10. Header set Strict-Transport-Security "max-age=15768000; includeSubDomains"
  11. Header set X-XSS-Protection "1; mode=block"
  12. Header set X-Content-Type-Options "nosniff"
  13. Header set Content-Security-Policy-Report-Only "default-src 'self'; img-src *; style-src 'unsafe-inline'; script-src 'unsafe-inline' 'unsafe-eval'"
  14.  
  15. ProxyVia On
  16. ProxyRequests Off
  17. ProxyPreserveHost On
  18.  
  19. # prevent your web server from being used as global HTTP proxy
  20. <LocationMatch "^[^/]">
  21. Deny from all
  22. </LocationMatch>
  23.  
  24. <Proxy *>
  25. Order deny,allow
  26. Allow from localhost
  27. # Allow from all
  28. </Proxy>
  29.  
  30. RewriteEngine On
  31.  
  32.  
  33.  
  34. LogLevel alert rewrite:trace6
  35.  
  36. #<IfModule mod_rewrite.c>
  37. # RewriteEngine On
  38. # RewriteCond %{HTTP_HOST} ^rpgbus\.com [NC]
  39. # RewriteRule (.*) http://www.rpgbus.com$1 [L,R=302]
  40. #</IfModule>
  41.  
  42. #works for specific domain as per: http://betabug.ch/zope/witch but need to wildcard the 120+ domains, not write 120 .conf files!!!
  43. #RewriteRule ^($|/.*) \
  44. #http://127.0.0.1:8080/VirtualHostBase/\
  45. #http/%{SERVER_NAME}:80/rpgbus/VirtualHostRoot$1 [L,P]
  46.  
  47.  
  48. # doesn't work: - RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:80/Plone/VirtualHostRoot/$1 [L,P]
  49. # almost works except doesn't pass the /<site> variable!
  50. #RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:80/VirtualHostRoot/$1 [L,P]
  51. #straight from here: https://docs.plone.org/manage/deploying/front-end/apache.html will not work with the "Plone" part at all
  52. RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/Plone/VirtualHostRoot/$1 [P,L]
  53.  
  54.  
  55.  
  56. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement