简体   繁体   中英

asp.net MVC 5 hosting setup

Note: because there is no windows hosting that satisfies me at the moment, I'm developing my application in PHP and host them on a linux VPS.

Since Windows Server 2016 supports Docker and you are able to create .net 4.5 images, I thought why not review my applications and hosting plans.

Because I'm not a fan of hosting websites directly on a VPS with IIS (setup and configuration seems clumsy), I thought this "infrastructure" seems ideal for me.

  • A Windows 2016 VPS
  • A Linux based VPS

For each asp.net application, create a docker image based on microsoft/iis . This means that for the application, there is nothing left to be configured, right? This application will run on the Windows 2016 server.

On the Linux VPS, I will have nginx configured to have all the configuration for SSL certificates and optimizations. Nginx will have proxies that point to the Windows 2016 VPS on specific ports for the different applications.

I think this architecture has scaling possibilities, less configuration on the Windows VPS, more room for improvement? It should even be possible to do this with Ansible if I'm not wrong.

I only need hosting, nothing related to email, ftp, ... That's why I'm not using shared and/or cloud hosting.

  • Does this architecture seem fine?
  • Am I missing something?
  • Would you still just use a Windows VPS for hosting asp.net applications, even if this architecture is possible?
  • Does this all seem possible with Ansible? I only have basic experience with it.

I don't see anything wrong in your proposal. Remember you can use ansible inside the Linux image's Dockerfile. Maybe you can find that it is an overkill but it should work.

Probably you will find some problems linking your Linux / Windows containers. But I don't see anything short stopping.

Go ahead and post your results. Also if you encounter some walls just ask here and we will try to help.

Regards

because there is no windows hosting that satisfies me at the moment, I'm developing my application in PHP and host them on a linux VPS.

Would you mind telling us a bit about your requirement of Windows Hosting?

For each asp.net http://asp.net/ application, create a docker image based on microsoft/iis. This means that for the application, there is nothing left to be configured, right?

Once fully functional pre-configured image is prepared, you don't have to perform any other changes to your main image. The main image is only modified when you want to update any application in the image or looking to make any changes or update Windows OS.

Does this architecture seem fine?

NGINX reverse proxy works with IIS backend, so, this proposed architecture is achievable. Initial setup of connecting Linux VPS NGINX web server to individual Windows docker image is slightly complex. If you are successful doing that, the next challenge will be adding subsequent dockers to Windows Hyper-V. Here, I don't see actual purpose of using Docker images to host ASP.Net http://asp.net/ applications, when you can easily deploy pre-installed VMs through Windows HyperVisor.

As far as Ansible is concerned, I don't have much idea about this product, but as seen on their website Ansible can automate the dockers.

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