如何更改Azure WebApp的初始化目录

我有一个运行在Linux Azure WebApp服务上的PHP应用程序,其结构如下:

|- includes/*
|- public_heml/
|--- /index.php
|--- /index_Routes.php
|--- /index_Routes.php
|--- /phpinfo.php
|- /src/*
|- /vendor/*

由于应用程序的构建框架,我必须保留此结构。

问题是我的Azure WebApp在应用程序的根目录上正在寻找index.php,但是我的index.php位于public_html/目录下。

如何使用Azure门户进行配置?

mameng125 回答:如何更改Azure WebApp的初始化目录

如果使用Linux OS,则无法选择使用Azure Portal进行配置。

解决方案:

1。在根目录下创建一个.htaccess文件。

.htaccess文件:

DirectoryIndex public_html/index.php

2。重新启动您的Web应用程序并等待几分钟。


这是我的网络应用程序的结构:

enter image description here

成功:

enter image description here

如果您还有更多疑问,请告诉我。

本文链接:https://www.f2er.com/3163017.html

大家都在问