Hi Guys,
I want to ask what happen to my plone site after using Apache as frontend proxy. I added a host config file under /etc/apache2/sites-enabled/ and I put the code below based on plone documentation.
UseCanonicalName On
NameVirtualHost *:80
<VirtualHost *:80>
ServerAlias paymaya-plone.com
ServerSignature On
Header set X-Frame-Options "SAMEORIGIN"
Header set Strict-Transport-Security "max-age=15768000; includeSubDomains"
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header set Content-Security-Policy-Report-Only "default-src 'self'; img-src *; style-src 'unsafe-inline'; script-src 'unsafe-inline' 'unsafe-eval'"
ProxyVia On
# prevent your web server from being used as global HTTP proxy
<LocationMatch "^[^/]">
Deny from all
</LocationMatch>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine on
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/PayMaya/VirtualHostRoot/$1 [P,L]
I also added the code below in /etc/hosts both in my local and vagrant virtual machine
127.0.0.1 paymaya-plone.com
And I change the vagrant file code since Apache uses port 80.
config.vm.network :forwarded_port, guest: 80, host: 8080
Then when I browse 0.0.0.0:8080 I can successfully see the Apache default html page
**Now when I browse paymaya-plone:8080 to my local it cannot locate the page, js and css.