I want setup Laravel framework on azure webrole and have to change document root, but so far I can't find way how to do this
My deployment project folder:
├──webrole <- now this is document root
│ ├──app
│ ├──bin
│ ├──bootstrap
│ ├──config
│ ├──database
│ ├──public <- I want make this as document root
│ ├──resources
│ ├──storage
│ ├──tests
│ ├──vendor
│ ├──.env
│ ├──.env.example
│ ├──.gitattributes
│ ├──.gitignore
│ ├──artisan
│ ├──composer.json
│ ├──composer.lock
│ ├──gulpfile.js
│ ├──package.json
│ ├──phpspec.yml
│ ├──phpunit.xml
│ ├──readme.md
│ ├──server.php
│ ├──Web.cloud.config
│ └──Web.config
├──deploymentSettings.json
├──ServiceConfiguration.Cloud.cscfg
├──ServiceConfiguration.Local.cscfg
├──ServiceDefinition.csdef
I found this Change approot path of Windows Azure WebRole but it's quite old question and there isn't approved answer
The only one workaround I've found is using rewrite rules but, I think that is not secure...
As in Azure Cloud Service PHP WebRole directory, where are
web.config
andweb.cloud.config
files which is leveraged to configure PHP site application on IIS.Web can find the content like the following in these files:
We can modify the setting
defaultDocument
to change the document root of your laravel application: