dousou1967 2016-02-12 08:23
浏览 102

在azure php webrole上更改文档根目录

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...

  • 写回答

1条回答 默认 最新

  • dongyi7513 2016-02-15 02:33
    关注

    As in Azure Cloud Service PHP WebRole directory, where are web.config and web.cloud.config files which is leveraged to configure PHP site application on IIS.

    Web can find the content like the following in these files:

    <system.webServer>
        <defaultDocument>
          <files>
            <clear />
            <add value="index.php" />
          </files>
        </defaultDocument>
      </system.webServer>
    

    We can modify the setting defaultDocument to change the document root of your laravel application:

    <system.webServer>
        <defaultDocument>
          <files>
            <clear />
            <add value="public/index.php" />
          </files>
        </defaultDocument>
      </system.webServer>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?