Problem with deploying / accessing my site through reverse proxy
Hi Everyone,
I have some problem with deploying my site and make it working correctly...
The infrastructure of servers is made in the way, that i can access my app via address "www.domainName.com/myApp/". There are others apps working on "www.domainName.com/App2/", "www.domainName.com/App3/", etc.
I know there is a reverse proxy server (Nginx) which on catching an URL with ".../myApp/" redirects a request to my web server, where i'm trying to deploy my app...
So when i enter an URL kinda "www.domainName.com/myApp/" my server receives "GET / HTTP 1.0" request... If URL kinda "www.domainName.com/myApp/file.php", server receives "GET /file.php HTTP 1.0"... There is no "/myApp/" prefix...
The problem is that the mechanisms in Laravel which are creating URL (Route::get() or assets(css/style.css)) do it in the way to return an URL like "www.domainName.com/somePage" or "www.domainName.com/file.php". So all routes i made don't work as it was at localhost, css&js don't load from public folder because URL's to access them are wrong... i.e. without the prefix "/myApp/".
So the behaviour is following - i enter http://domain.com/intraob/. I get the 'index' page, but styles are not loaded because it trying to get it at "http://domain.com/css/app.css" & not at "http://domain.com/intraob/css/app.css".
So i'm asking if there is some workaround to this problem? Configure some Laravel evn vars maybe?
Thanks
Ivan
Please or to participate in this conversation.