question

MarcusGiddings-6439 avatar image
0 Votes"
MarcusGiddings-6439 asked ·

following tutorial and have encountered problem You do not have permission to view this directory or page

I have been following this tutorial, but as azure no longer support web app redirects to HTTP website I have created a web app in azure as this as standard has HTTPS.

I have followed the tutorial to the section get user details and have tested it locally using

PHP artisan serve

and all seems fine however when I have deployed it to azure via visual code I get

You do not have permission to view this directory or page.


as the tutorial is meant for a local instance am I missing something or have I missed a step any help would be grateful also I'm new to azure web apps and laravel so please try to explain things to a basic knowledge level.

azure-webappsmicrosoft-graph-sdk
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MarcusGiddings-6439
Thank you for your post!

Based off your issue, it sounds like everything is working as expected. However, when it comes deploying your project to Azure via Visual Studio Code, you get an error message.

  • Are you able to share a screenshot of what you're seeing?

  • Can you make sure you're logged into the correct account?

  • Is the tenant that you're deploying your app to one that your user is apart of?

Any additional details would greatly be appreciated!


I've also added the webapps and visual studio tags to this thread so their community can take a look at this issue as well.


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.

0 Votes 0 ·

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered ·

@MarcusGiddings-6439 , Adding to James response:

Laravel, uses the public/ subdirectory as the site root.

The default PHP image for App Service uses Apache, and it doesn't let you customize the site root for your app.
To work around this limitation, add an .htaccess file to your repository root with the following content:

Ensure that all the files are correctly added in the folders.

 <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{REQUEST_URI} ^(.*)
     RewriteRule ^(.*)$ /public/$1 [NC,L,QSA]
 </IfModule>


You may inspect the log files to fetch more details on the error.
https://<your-app-name>.scm.azurewebsites.net/api/logs/docker.

See this doc for more details on configure a PHP app for Azure App Service.

Kindly let us know the status, we will be more than happy to assist you further.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.