dimanche 29 novembre 2020

Not propperly routing in reversed proxy Laravel App

I have configurated an Apache Server which uses reverse proxy to show a web app developed in laravel and mounted in another apache web server. Let's say that the domain is myapp.app Which works properly, but when I click to a subdomain, let's say myapp.app/register the browser returns myapp.appregister/.

At the moment I've configurated my webserver as it follows:

  <IfModule mod_ssl.c>
<VirtualHost *:443>
             SSLEngine On
             ServerName myapp.app
             <Proxy *>
                Order deny,allow
                Allow from all
             </Proxy>
             <Location "/">
                RequestHeader set X-Forwarded-Proto https
                RequestHeader set X-Forwarded-Ssl on
                RequestHeader set X-Url-Scheme https
             </Location>
             ProxyPreserveHost on
             ProxyPass         /        http://172.31.0.234/
             ProxyPassReverse  /        http://172.31.0.234/
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias www.redes-erdica.tech
SSLCertificateFile /***.pem
SSLCertificateKeyFile /***.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:80>
             ServerName myapp.app
             Redirect permanent / https://myapp.app/
</VirtualHost>
</IfModule>

And the config file for the inner apache server has no other configurations besides the location of the laravel Project. Some curious event that happens is that if I type manually myapp.app/register it sends me where it should be, so why the browser sends me in a wrong direct when I click in the register button?

In addition, the app in localserver works properly.




Aucun commentaire:

Enregistrer un commentaire