1

I am using Visual Studio Team Services to release my LARAVEL Project to Azure. On the Azure application setting and by default to virtual directory it sets : "/" as "site\wwwroot" (1)

But with the Laravel Framework the application is accessible from "http://PATH\public" When I set "/" as "site\wwwroot\public" I can access to my application.

But if I made a new release, I have to remove "public" from the path setting (1) during the release and add it after. If I am not doing that, the new release will be published at "site\wwwroot\public\public"

I would like to automate the process and not every release, have to remove "public" and add it after

I have tested also a Azure powershell task but it is not working. Does anyone as solution to share please ?

dev944
  • 41
  • 5
  • How do you publish your project? Through Azure App Service Deploy task? What's the folder structure of project package that used to deploy? – starian chen-MSFT Feb 26 '18 at 06:53
  • Thank you for support, I Publish the project from VSTS to Azure using the Azure App Service Deploy task. I use my folder development, it a parent folder from my LARAVEL framework php project. – dev944 Feb 26 '18 at 13:58
  • Where do you remove "public" from the path setting? Is there a public folder in the parent folder of the project? Can you share the detail log of Azure App Service Deploy task on the OneDrive? – starian chen-MSFT Feb 27 '18 at 02:03
  • Hello, Laravel framework working by displaying content from "public" folder. In Azure virtual repository I have : "\" as "site\wwwroot\public". If I would like to release my application from VSTS to AZURE I had to remove the "public" from the Azure "/" virtual repository. After the release I had to add "public" on the "/" virtual repository value to see the content because Laravel working like that – dev944 Feb 27 '18 at 13:47

2 Answers2

3

Thank you for reply. I did it but no it this way :

  1. Go to AZURE -> APPLICATION -> APPLICATION SETTINGS,
  2. I set virtual directory with virtual path : /myApplication to site\wwwroot& / to site\wwwroot\public.
  3. Go to VSTS, on the release option, on the Deploy Azure App Service task
  4. I set virtual application to /myApplication, and it is working well !
dev944
  • 41
  • 5
0

Refer to these steps below:

  1. Log on azure > Select your App Service > Application settings
  2. Add a new virtual application or directory in Virtual applications and directories (Virtual path: /public; physical path: site\wwwroot\public; Check Application option)
  3. Edit your build/release definition
  4. Select Azure App Service Deploy task and specify public in Virtual application input box (Package or folder: {project runtime files path})
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53