Use laravel on azure webapp - php

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

Related

How to use Laravel storage on Azure Web App

I'm trying to host my project using Azure Web App. I created storage link
console output , but I still can't access my files. How can I fix it? Files appear in public folder if check from Kudu.
Thanks for asking question! If I have understood right you want to have a Laravel app running on Azure App Service. If so, you may wish to investigate this article which deploys an app to App Service on Windows and to this article if deploying to App Service on Linux.

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.

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

laravel 5.1 on windows azure web application

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.

Azure Web Apps: FTP-uploaded file permissions

I'm in the process of getting a Laravel 5 app working on Azure Web Apps and am encountering an issue via Laravel's temporary storage.
Any time a template renders, Laravel attempts to cache it to the local filesystem. Unfortunately, for some reason Laravel doesn't have permission to write to its storage directory.
I am deploying my application from my build server via FTP
I am running on the free-tier shared infrastructure (just while I'm getting set up)
My deployment server is running Linux
In this circumstance, it's obvious what the problem is. Unfortunately, what I don't understand is why my web server doesn't have access to write to the directories my FTP user uploads.
Ideally any solution offered will be one that I can automate as part of my deploy process.
According to http://clivern.com/working-with-laravel-caching/, you can change the directory of the cache files using the cache.php configuration file. I'd like to suggest you to use $_SERVER['DOCUMENT_ROOT'] to obtain the root folder of your web app, and then construct a path for the cache files.

Categories