azurenginxorocrm

Orocrm Azure VM https settings


I have deployed Orocrm image by Oro Inc in Azure from the marketplace.

The site works well with plain http.

Out of the box, /etc/nginx/conf.d/default.conf has only http settings. I have added some sections for https server based on Oro's document https://doc.oroinc.com/backend/setup/dev-environment/community-edition/#configure-web-server

and uploaded my certs. When I browse the site it downloads a file instead of serving the home page. What do I need to do to fix this? Adding everything in the sample configurations from the link above throws lots of errors.

EDIT:

I followed this documentation and I got it to work. https://doc.oroinc.com/backend/setup/dev-environment/web-server-config/

Though, anytime I click somewhere inside the site, it switches back to http.

Thank you


Solution

  • This is the solution that worked for me:

    I added this code inside the server {} block in default.conf

      if ($scheme = "http") {
          return 301 https://$server_name$request_uri;
      }