• 14
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Apache Reverse Proxy Cookie / URL Rewrite

We have a apache reverse proxy setup on an Ubuntu server. The server should redirect users to other server via reverse proxy and store the cookies.

The server with the apache also hosts an Wordpress setup running.

We have set it up, It works fine except there is a flaw in the URL section and cookies.

Example:

When we click on the url below https://subdomain.mywebsite.com/?a_aid=137355&brandid=509821&languageCode=EN&mobile=0

It redirects to

https://otherwebsiteintheproxyserver.com/?languageCode=EN&mobile=0

And it doesn't store any cookies as far as I can tell.

 <IfModule mod_ssl.c>
    <VirtualHost subdomain.mywebsite.com:443>
        ProxyPreserveHost On
        RequestHeader set Front-End-Https "On"
        ServerName subdomain.mywebsite.com
        SSLProxyEngine on
        ProxyPass / http://someother.domain.com/
        ProxyPassReverse / http://someother.domain.com/
        ProxyPassReverseCookieDomain https://subdomain.mywebsite.com http://someother.domain.com/



    SSLCertificateFile /etc/letsencrypt/live/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateChainFile /etc/letsencrypt/live/chain.pem
    </VirtualHost>
    </IfModule>

Trending Tags