HAProxy and SSL for marketplace

Laraship QuestionsCategory: TechnicalHAProxy and SSL for marketplace
phat.pham asked 5 years ago

Hello,

I am using HAProxy as frontend SSL termination for my websites, and redirect all traffic to https://, however i couldn't login to Laraship website.

Is there any setting should i enable in Laraship config so that it would enable all link to use https?

Here is my diagram:

Public access -----(https) ----- HAProxy --------> backend (Laraship on Nginx)

Thank you.

1 Answers
laraship Staff answered 5 years ago

Hello,

Laraship detects the URL automatically , both domain and http/ https mode.

however to force https please make the changes to app/providers/appServiceProvider.php in boot method

use IlluminateSupportFacadesURL;

URL::forceScheme('https');

phat.pham replied 5 years ago

Great. It works after adding this code.

Thanks a lot.