Guest User

Untitled

a guest
Dec 12th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ProxyPreserveHost On
  3. ProxyRequests Off
  4. ServerName mywebsite.com
  5. ProxyPass / http://127.0.0.1:8080/
  6. ProxyPassReverse / http://127.0.0.1:8080/
  7. </VirtualHost>
  8.  
  9. <VirtualHost *:80>
  10. ProxyPreserveHost On
  11. ProxyRequests Off
  12. ServerName mywebsite.com
  13. ProxyPass /static https://s3.eu-west-2.amazonaws.com/
  14. ProxyPassReverse /static https://s3.eu-west-2.amazonaws.com/
  15. </VirtualHost>
  16.  
  17. <VirtualHost *:80>
  18. ErrorLog logs/mywebsite.com-error_log
  19. ProxyPreserveHost Off
  20. ProxyRequests Off
  21. ServerName mywebsite.com
  22. ProxyPass /static https://s3.eu-west-2.amazonaws.com/mywebsite-static-repo
  23. ProxyPassReverse /static https://s3.eu-west-2.amazonaws.com/mywebsite-static-repo
  24.  
  25. </VirtualHost>
  26.  
  27. File does not exist: /var/www/html/mywebsite-static-repo
  28. [warn] proxy: No protocol handler was valid for the URL /static/mywebsite-static-repo/images/some-img.png. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
  29.  
  30. SSLProxyEngine on
  31. SSLProxyVerify none
  32. SSLProxyCheckPeerCN off
  33. SSLProxyCheckPeerName off
  34. SSLProxyCheckPeerExpire off
  35. ProxyPass /static/ https://<bucket_name>.s3.amazonaws.com/<bucket_name>/
  36. ProxyPassReverse /static/ https://<bucket_name>.s3.amazonaws.com/<bucket_name>/
  37.  
  38. RewriteRule "/static/(.*)$" "https://<bucket_name>.s3.amazonaws.com/$1" [P]
Add Comment
Please, Sign In to add comment