Content
You are here:
Reverse Proxy
Added by Justin Nogossek about 1 year ago
Hi, have this Apache2 configuration:
<VirtualHost *:80>
ServerName <DOMAIN>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerName <DOMAIN>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/<DOMAIN>/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<DOMAIN>/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/<DOMAIN>/fullchain.pem
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /(.*) ws://127.0.0.1:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) wss://127.0.0.1:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) http://127.0.0.1:8080/$1 [P,L]
</VirtualHost>
Only then, whenever I want to log in, this comes up:
[Error 422] The cross-site request forgery token could not be verified. If you tried to save data on multiple tabs or browsers, close them and reload this page to repeat the process.
And yes, I have only one tab open