Anyone knows the best way to deploy yii2 framework web app on azure?. And is there any resource of how to connect database on azure.
You can using App Service/Web App. Follow these steps:
Push your app to github/bitbucket or whatever (I am using github)
Open https://portal.azure.com and login into your account
Go to Create resource -> Web -> Web App
Fill up the form and click create button
After successfully created, open your created resource
Click Deployment Center -> Github -> Continue -> Kudu -> Continue
Choose your group, repository and branch -> Finish
Install Composer:
Click Console
Follow this instruction
Execute php composer.phar install -vv
Execute chmod +777 assets
Don't forget to check the requirement here: https://yourdomain.com/requirements.php
Setup entry point:
Click Application Setting
Choose appropriate PHP version (7.X)
Go to Virtual applications and directories (At the bottom)
Change site\wwwroot to site\wwwroot\web
Save
Your Yii2 app should be running now.
To connect Azure Database just simply create the database on Azure, copy server name into db.php. If you want to test your app from localhost using Azure Database, don't forget to whitelist your public IP address on Database Firewall Setting
You can check this blog, though it is referring using the Classic Portal you can follow similar steps in the New Portal.
https://blogs.msdn.microsoft.com/azureossds/2015/07/23/migrate-yii-framework-application-to-azure-web-app/
Related
I have created a web API, and now I want to deploy it. Unfortunately, when I try to publish my web API, I need to sign in or create a new account on the App Service step.problematic step
When I try to log in or even create a new account - it accepts it but doesn't allow me to go further and open the App Service settings like this: enter image description here
In my case, it was because I didn't activate any subscription. But in my opinion, instead of just not allowing me to deploy my WEB API, they could also specify the cause.
I'm deal with azure for the first time, i'm try to create new Laravel project with Azure microsoft, at first i install the composer, then i create new project on site folder, how can i show the Welcome laravel page on my browser? that means what URL should i enter?
Assuming you're using an App Service: [the name you entered when you created your App Service].azurewebsites.net.
If you don't remember it, locate your App Service in the Azure Portal and the URL will be displayed in the top right of the Overview blade.
i'm new to azure, and just deploying phpBB from the app gallery
is there any way to add new styles/extention to it?
Thanks
When you use the Gallery, you are just creating a web service and automatically uploading whatever software into that service.
To modify your web app, you can FTP into it. First, you need to create an FTP login:
In the blade for your web app, click All settings:
Click Deployment credentials.
Enter a user name and password.
Click Save.
The full FTP user name is “app\username” where app is the name of your web app. The username is listed in the web app blade, under Essentials.
Then follow this phpBB guide for installing styles: https://www.phpbb.com/support/docs/en/3.1/kb/article/how-to-install-styles-on-phpbb3/
When it comes to the FTP steps, use the info you see on your web app and the login you just created.
Extensions are installed a similar way.
Alternatively, you could also set up a git repo with a copy phpbb in it, then push that repo onto your web app. But that is more complicated, FTP is your most direct bet to modifying your phpBB web app.
In my local IIS server, i have created a IIS website and deployed 3 ASP.NET web application such that they will have URL like
IIS URL/webapp1 , IIS URL/webapp2 , IIS URL/webapp3 and it works like charm. I am able to deploy only one web application in Azure webapp and not others.
Can i deploy more than one web application in one Azure web app ? If yes, then how ?
My solution is described below. First create a sample AzureWebsite -
Setup up an additional application in the AzureWebsite as follows. Navigate to Configuration tab and create an application as shown below –
By creating above application we reserved / to MVC site and then /webapi to webapi endpoints.
Lets say you want to publish MVC and Web API projects from VS Solution as shown below.
Download publishsettings file of above created AzureWebsite. Import the publishsettings file to the Visual studio MVC project (right click the project and select publish) as shown below -
Similarly publish the WebApi project by importing the same publishsettings file. But we need to change the Destination URL and Site name to the newly created application details. Please check below screenshot –
Publish both the projects.
Now navigate to http://ramidev1.azurewebsites.net for the MVC site. And navigate to http://ramidev1.azurewebsites.net/webapi/api for WebApi endpoints.
Yes, you can do that with virtual directory.
Quote from Add virtual directory to existing website on Azure
Virtual Directories are supported for Azure Websites. See Configuring
Azure Websites for what you can do through the Azure Management
Portal. From the Azure Portal, click on the Website and go to
Configure, then scroll down to virtual applications and directories
(the last config section). Just enter your virtual directory and the
physical path relative to the site root and click Save.
I Used Azure Website Migration Assistance to migrate my web service that was running on my Local VM's IIS. My Migration process was successful and also I was able to use this web service. But I can't find where to find the migrated source code in azure portal. All I can see is some 20Mb of data in on the dashboard graph of azure portal. If I need to changed some of my code where to do this?
What is on the Azure Web App should now match what was on your IIS server. Now, to update the web app, you can use the deployment techniques here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
The simplest method to deploy to check what content is on your web app would be to use the SCM site. This is available at: https://your-site-name.scm.azurewebsites.net. Go to Debug Console > CMD and then the site > wwwroot folder to see your web app content. You can also upload to the site via drag and drop.
Alternatively, you can download the publishing settings for your web app via the portal and then re-use the migration tool, select the site, and then upload the publishing settings. However I would suggest using the deployment techniques above first. (Disclaimer: I wrote the migration tool.)
There are multiple ways to push changes to your Azure Website/Web App. They are listed here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/
One simple way is to use an FTP client like FileZilla. In the classic portal, you will find the FTP address (hostname) and the credentials in the dashboard tab. In the new portal, select your Web App and the FTP address will be displayed in the Essentials section at the top of the page. Click on Settings and Deployment credentials to set your FTP user password.
Another simple alternative is to use Dropbox. Take a look at this video for how to set instructions: https://channel9.msdn.com/Series/Windows-Azure-Web-Sites-Tutorials/Dropbox-Deployment-to-Windows-Azure-Web-Sites