简体   繁体   中英

How to run Wordpress with MVC app as virtual on Azure

I'm wondering how to run a Wordpress and virtual MVC application under the WP on Azure. I found a lot of articles about this but it is not working and Azure SDK is changing all the time, there is no actual informations.

Am I able to connect to the Azure Web Role IIS server remotely?

If you have any questions, please ask before answering.

Update by Jim O'Neil comment

Yes I mean ASP.NET MVC. "Not working" means taht WP on Azure by this and ASP.NET MVC app works separatelly but together doeasn't. When I try add ASP .NET MVC as VirtualApplication by this tutrial VM on Azure is always in Busy state.

I need have an WP deployed on my domain example.com and ASP.NET MVC app at example.com/mvcapp. This should work on the Azure platform and could be reached by Virtual application feature of IIS. Then I hope that the Azure Web role is usable for this.

Do you have any idea?

If you really want to run wordpress website as www.example.com and ASP.NET MVC app as www.example.com/mvcapp then you could need to be little more creative to get it working. It is a doable task but need good understanding of Windows Azure platform, how Web Role works as well as PHP/WordPress knowledge.

I can point out some ideas on how you could do it but you would need to venture out to try and test. What you really need to create a ASP.NET Web Role with PHP support and have Wordpress configured to it. This could be done at runtime or you can put together worldpress along with the PHP itself so when you deploy your application whole wordpress is configured as package. Now in the same web role you add virtual diurectory and have MVC app running as application there.

Keep in mind that whole web role will have one single web.config so you would need to make it work with both ASP.NET PHP application and then MVC application. Tough task to handle these two and will take time to put together.

The other easier option is to have PHP running inside a ASP.NET MVC application and in the PHP folder setup your Wordpress application. This setup is easily configurable but it will change the location for wordpress and MVC app other way around.

Overall I really think you should rethink what you really want at the last because your objective just does not match with a need to have wordpress and ASP.NET MVC running together. If you just want to try for experiment, it sure is a great project and make you learn a lot.

This question is asked earlier @ SO also but had same response ie why?

I am not sure about on azure, but on IIS7 we have WP and the URL Rewriter setup as the default website and then deploy asp.net and ASP apps to virtual directories and turn off the URL Rewriter in those subdirectories. Works beautifully. Downside is that PHP runs like a dog on IIS compared to ASP/ASP.net. We are switching to using WP on LAMP and then continuing to run our ASP/.net apps on IIS7. Downside is that the WP after switch over may effect our SEO a little. IIS is www and WP will be ww3.

You might check your URL Rewrite rules if any.

You can create a website in Azure using a wordpress template VM. You can also use http://wordpress.brandoo.pl/project/ which has an image available in Azure, this means you can use a SQL database rather than a MYSQL database which may help.

You can have one VM being your MVC app pointing to www.mydomain.com and you could have the worpress in a separate VM with say blog.mydomain.com

This would make maintenance easier I think

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