0

I am using the lastest version of strapi (v3.x)with Node v10.15.2. I am trying to deploy to Azure Web App using this server.js configuration.

module.exports = ({ env }) => ({
  host: env('HOST', 'localhost'),
  port: env.int('PORT', 1337),
  url: 'https://clinicaback.azurewebsites.net',
  cron: {
    enabled: false
  },
  admin: {
    url: "/dashboard",
    autoOpen: false,
    build: {
      backend: "https://clinicaback.azurewebsites.net"
    }
  }
});

It build successful and seems like is running with the development configuration. Here is the output from Azure's kudu service

enter image description here

but when I enter to the website, it does not load. and I ran Diagnose and solve problems from Azure and it's showing this...

enter image description here

Allan Ramirez
  • 125
  • 1
  • 15
  • Have you tried specifying the local port to 80? – fiblan Jun 14 '20 at 15:42
  • You can try my solution first, if there are any problems, you can tell me and look forward to your reply. – Jason Pan Jun 15 '20 at 04:27
  • 1
    Is the problem solved? Or tell me if the answer is helpful for you, if you encounter new problems, and look forward to your reply. – Jason Pan Jun 16 '20 at 02:38
  • If this was solved by the marked answer from Jason Pan, did you change the setting "port" or "url" to 80 or 443 in config/server.js to fix it? – emilz0r Sep 25 '20 at 17:34

1 Answers1

2

The webapp only supports port 80 and port 443. It is recommended to modify the relevant port settings in your code.

It is recommended to release the code after build, add npx serve -s as Startup Command for your App Service> General settings.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29