简体   繁体   中英

How to deploy PHP Lumen API Code in Azure Web App

I want to deploy lumen code in Azure Web App Service. I am following this link to create PHP Web App in Azure App Service. I am able to create and launch simple Hello World Application as mentioned here.

Now, I want to deploy actual Lumen code in Azure App. I cloned lumen application using composer create-project --prefer-dist laravel/lumen myfolder command and trying to serve the application using php -S localhost:8000 -t public (used my azure server name instead localhost:8000 ) command. But It is not working.

How to deploy and How to serve this Application in server?

Maybe you need to set the default page? Please show the details of what you get.

After you deploy the app, it should works.

Try this:

Move your lumen application outside public_html.
Move your index.php file in subdomain.
Edit index.php set route to your subdomain

Command for different host:

php -s localhost:8000 -t public/

used your azure server name instead of localhost:8000

Sometimes Php artisan serve not work properly so you can use

http://localhost/here_project_name/public/

Please refer: https://www.tutsmake.com/laravel-command-php-artisan-serve-not-working-properly/

For Deploy Laravel Lumen on Azure Web App

Please refer: https://medium.com/swlh/deploy-laravel-5-8-on-azure-web-app-2019-3514eb2fd1af

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM