cancel
Showing results for 
Search instead for 
Did you mean: 

How to install magento 2 behind a reverse proxy

How to install magento 2 behind a reverse proxy

Hello,

 

I'd like to install Magento 2 behind my nginx reverse proxy.

 

However I'll access the installation from the internet using url http://magento.mysite.com

 

But Magento on the back end server thinks it's located in

/html/myapps/magento

 

I'm able to see the page

"Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read Magento System Requirements."

 

But any attempt to do something fails because I'm redirected to

http://magento.mysite.com/myapps/magento

instead of

http://magento.mysite.com/

 

To me it's not a reverse proxy problem it's just that magento looks at where it's installed and the location is not the same as what the user typed in it's url.

 

Thank you

2 REPLIES 2

Re: How to install magento 2 behind a reverse proxy

Hi @mikydevel,

 

What if you install Magento using the CLI and set the right URL?

Re: How to install magento 2 behind a reverse proxy

Hello,

 

I managed to (partially) install the magento application in https.

By the way I increased the timeout like

fastcgi_read_timeout 700;

So that the installation can proceed