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

Php 如何更改Azure WebApp的初始目录,php,azure,azure-web-app-service,Php,Azure,Azure Web App Service,我有一个PHP应用程序运行在Linux Azure WebApp服务上,其结构如下: |- includes/* |- public_heml/ |--- /index.php |--- /index_Routes.php |--- /index_Routes.php |--- /phpinfo.php |- /src/* |- /vendor/* 我必须保持这种结构,因为应用程序构建的框架 问题是,我的Azure WebApp正在我的应用程序根目录上运行index.php,但我的index.

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

|- includes/*
|- public_heml/
|--- /index.php
|--- /index_Routes.php
|--- /index_Routes.php
|--- /phpinfo.php
|- /src/*
|- /vendor/*
我必须保持这种结构,因为应用程序构建的框架

问题是,我的Azure WebApp正在我的应用程序根目录上运行
index.php
,但我的
index.php
位于
public\u html/
目录下


如何使用Azure门户配置它?

如果您使用
Linux操作系统
,您没有选择使用Azure门户配置它

解决方案:

DirectoryIndex public_html/index.php
1.在根目录下创建一个
.htaccess
文件。

.htaccess
文件:

DirectoryIndex public_html/index.php
2.重新启动web应用程序并等待几分钟。


这是我的web应用程序的结构:

DirectoryIndex public_html/index.php

成功:

DirectoryIndex public_html/index.php


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

那么,您可以提供您所基于的操作系统吗?窗口或Linux@BowmanZhu林努希,我这边的事情很顺利。你可以试试看它是否对你的也有效。你试过我的解决方案吗?是工作吗?工作得很有魅力