laravel 5.1 on windows azure web application - php

I want to deploy a laravel app on my azure web application
but that return this error
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
I know my web.config was setting error ..
I search some resource also can't resolve my question ...
http://blog.bobbyallen.me/2015/06/26/configuring-and-hosting-laravel-5-x-applications-on-windows-azure/

Actually, Azure Web site’s root directory is site\wwwroot, when we are deploying projects from Github to Azure Web Apps, Azure will automatically move the project to the root path site\wwwroot. So it is not necessary to change the root directory.
On my side, I cloned your project, deployed it on Azure by git, and browsed the URL <site_name>. azurewebsites.net/public to check project. I got the error message about the project couldn’t find the file vendor/autoload.php, so it looks like the project was lack of dependence.
I installed composer as the article you provided told in KUDU Console site. The URL should be https://<your_site_name>.scm.azurewebsites.net/ (first installed composer, we need to restart the console site).
Then click “Debug console”=>”CMD” at the header navigation of the console site to enter in command line tool, change directory to D:\home\site\wwwroot and run composer install, after finishing installation, we browse <site_name>.azurewebsites.net/public again, and it works well.
To set the URL rewrite to remove the “public”, we can simply modify “site\wwwroot” to “site\wwwroot\public” at virtual applications and directories section in Azure portal.
In addition you may want PHP project to show detailed errors during testing. By default, “display_errors” is off, we can simply create a file named “.user.ini” in the root directory and wirte “display_errors = on” in this file. Please read this article for more information.

Related

SOS! How do I deploy multiple Laravel apps on a windows IIS server in a LAN

I am setting up an IIS server in readiness to host multiple PHP web apps. These will be used within our local network so no need internet access. I have read a lot of stuff on how to go about it but am getting lost even more. someone please help.
You can refer to this document for detailed steps about deploy php application on IIS.
Here are some main important points:
Install IIS in control pannel(windows) or server manager(windows server).
Configure php. Youcan download it from php official website or Web PI(more recommand). The version over php8 may not work on IIS.
Make the physical path of site points to root folder of application. It will auto generate web.config. Set the permission of root folder to avoid 500 error.
If you have multiples version of php, you can isntall php manager to configure them.

Laravel app/public folder on Azure App Service (with nginx)

We need to publish a Laravel 8 project on Azure App Services, configured with nginx.
We only have FTPS access and the server runs on nginx. We do not have root or Azure UI access.
We tried to change the public path in server.php to /wwwroot or the relative path to the bootstrap and vendor, as suggested by several posts. Changed webpack mix path etc. But we keep on getting 404 (even though the index.php is there).
How can we configure Laravel to serve the app correctly?
Just to highlight, yes Linux PHP v8 blessed images are defaulted to nginx/php-fpm. So, you will not need .htaccess, however, you may try with rewrite rules to mimic .htaccess.
You can configure using startup command.
Azure App Service on Linux FAQ
Just to confirm, does it work locally fine as expected? You try these to isolate the issue further.
• Access the log stream.
• Test the app locally in production mode. App Service runs your app in production mode, so you need to make sure that your project works as expected in production mode locally.
For example:
o Depending on your composer.json, different packages may be installed for production mode (require vs. require-dev).
o Certain web frameworks may deploy static files differently in production mode.
o Certain web frameworks may use custom startup scripts when running in production mode.
• Run your app in App Service in debug mode. In Laravel, you can configure your app to output debug messages in production by setting the APP_DEBUG app setting to true.
If your requirement fits, you may deploy your Laravel application with a custom Docker image instead.

How to host Codeigniter app on Azure?

I wanted to ask you to help me (with some tutorial link or something), what i want to do is to upload php Codeigniter application on azure?
Also in my application, I got upload feature so I should make it work too (don't know if it's more complex becasue of that).
I was using wamp during developing, now I need to push it on server.
Generally, deploy a CI application to Azure Web Apps is simple, you can simply create an Azure Web Apps on Azure portal, then step in the manage page of your Azure Web Apps, click All settings=>deployment source=>chose source=>Local Git Repository to set the git deployment setting of your Azure Web Apps service.
Then you can find the Git clone url under the essential tab.
Additionally, Azure App Service can run php composer.phar install when you run git push, but it's not enabled by default. To enable it, you need to install the Composer extension for your web app.
Here is a CI template on Azure sample, you can refer to https://github.com/Azure-Samples/app-service-web-php-get-started for any hits.
And here is a video https://youtu.be/bBb_Hi2Odqc, you can refer to. It manages on the classic portal, but still works today.
Deploying Codeigniter is very easy, all you need to make sure is placing the project directory correctly.
Just upload the project folder to the hosting either by SSH or FTP.
Modify the .htaccess file accordingly.
Once all the above is set up, including uploading all the files to host, don't forget to update config.php database.php and route.php with new hosting parameters.
To make your upload feature work correctly you just need to give proper/required write access to the upload folder of the application.
And that's all you need to do while deploying Codeigniter application.

Use laravel on azure webapp

My project is developed with larval, then i am trying to use azure for web server.
I am copying folder laravel in C:\inetpub\wwwroot\laravel5. Next I run php artisan serve.
Then I test on http://localhost:8000/index (test on remote websever). It's ok.
But if I access my url for example http://bobdict.cloudapp.net/index, it say page not found.
What is the problem?
I am a newbie for this, sorry.
It seems you are using IIS to host your PHP application on Azure VM.
As the entrance of laravel application locates in public folder in the root directory of the application. You can test to browse http://bobdict.cloudapp.net/public/index to test whether you have deploy laravel application successfully. Then to config URL rewrite for friendly URL pattern. You can create the web.config manually in your root directory of your application.
You can refer to http://blog.qbotx.com/basic-laravel-5-on-microsoft-azure-part-1/ for the content of web.config.
in azure portal configure docroot to
wwwroot/laravel5/public

Deploy laravel on azure server [duplicate]

My project is developed with larval, then i am trying to use azure for web server.
I am copying folder laravel in C:\inetpub\wwwroot\laravel5. Next I run php artisan serve.
Then I test on http://localhost:8000/index (test on remote websever). It's ok.
But if I access my url for example http://bobdict.cloudapp.net/index, it say page not found.
What is the problem?
I am a newbie for this, sorry.
It seems you are using IIS to host your PHP application on Azure VM.
As the entrance of laravel application locates in public folder in the root directory of the application. You can test to browse http://bobdict.cloudapp.net/public/index to test whether you have deploy laravel application successfully. Then to config URL rewrite for friendly URL pattern. You can create the web.config manually in your root directory of your application.
You can refer to http://blog.qbotx.com/basic-laravel-5-on-microsoft-azure-part-1/ for the content of web.config.
in azure portal configure docroot to
wwwroot/laravel5/public

Categories