0

Long story short, we have an old, ill-maintained web app hosted in a google cloud account we don't have access to anymore, so we want to move it over to our company Azure account.

In Azure, we created a new web app, and set it to pull from our repo. First build failed, but that's because it was using a really old Kudu deployment script. So I generated a new one (using azure-cli) and pushed the new script. In Azure, the build succeeded now, but when I go to the url for the site, nothing is there. As far as I can tell, the app is never starting.

Here's all of the information that I could think of that might be relevant. I don't fully understand all of the gruntfile stuff (I just know I type 'grunt serve' to work on the app locally :P), so I'm not sure if that's what I'm missing or what. If there's any other info needed, just let me know and I can add it.

Thanks for any help!

5
  • What do mean by "not working"? Are you running into 404 or 500 error? Commented Jun 12, 2017 at 10:02
  • Did you check the status in Azure portal? any screenshot would be helpful. pls share. Commented Jun 12, 2017 at 14:07
  • Sorry, I had to sleep. @AaronChen-MSFT Sorry I wasn't specific. Getting '403 (Forbidden)'. Commented Jun 12, 2017 at 15:33
  • @ArunVinoth Screenshots of what, exactly? IE, in the web servce tab, if you tell me what you want to see exactly, I can get it. Commented Jun 12, 2017 at 15:37
  • 1
    So, I've done some more digging in Azure using the Kudu Advanced Tools. In '/wwwroot', my app resides in a subdirectory there called 'app'. index.html is in the app subdirectory. If I manually type in %our azure url%/app/index.html, it does try to load the html file, but everything is broken because all of the script/styles/etc path structures are broken. IE, it's trying to load them from /wwwroot/scripts/app.js, /wwwroot/styles/main.css instead of from /wwwroot/app/. It seems it's not respecting the appPath variable set in the gruntfile? Commented Jun 12, 2017 at 16:19

1 Answer 1

1

Please consider using HTML <base> element to specify the base URL for all relative URLs contained within a document.

In this case, you can specify a base URL in index.html like below:

<head>
    <base href="/app/">
</head>

Also, if you don't want type /app/index.html in the URL to visit your site, you cloud add this to Default documents under Application settings menu in the Azure portal.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.