Reputation: 2702
I've been fiddling around with vNext a bit and got the sample projects running. I created an Ubuntu VM, installed the required packages and got it all running with k run
(console app) and k kestrel
(MVC app).
Now, onto the next step: running several projects on a dedicated webserver. Kestrel is (at least for now) just a simple development webserver used for vNext. Chances it will develop into a full-blown webserver seem small.
Thus, I would like to get the thing running on Apache. I guess mod-mono would come into play somewhere. However, at the moment I don't think it supports the latest vNext framework yet. On the other hand, I guess we'll need the KRE somewhere.
Any news out there that we'll be running ASP.NET projects on Apache anytime soon? Anyone managed to do it?
I'm greatly fascinated by the idea of cross platform .NET applications. My current employer is investing a great deal in projects using cross-platform and open-source software. I'd like to gain some knowlegde in advance and try to lead the way in migrating completely to Linux web servers instead of Windows servers.
Thanks!
Upvotes: 8
Views: 2823
Reputation: 121
I'm happy to see there are plenty of us trying to get vnext up and running outside Windows environment:)
Of course you are right about kestrel. It will probably end up as a simple web server just like it works right now in the node.js Hello World tutorial. You can try to use it as a production environment by running it in the background Running K Kestrel in the background on a webserver and then pass requests to kestrel by Apache Proxy
VirtualHost example proxying requests to kestrel started on *:5004
<VirtualHost *:80>
ServerName example.com:80
ProxyRequests On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost Off
ProxyPass / http://localhost:5004
ProxyPassReverse / http://localhost:5004
</VirtualHost>
But I do not recommend above solution. There are some issue with kestrel that prevents you to send an output outside tty and therefore you can't run it at startup with a startup script. So the website you've started will last as long as your server stays online :)
What I do recommend is to use Docker. It's kind of a wrapper for ASP.NET that is being supported by Microsoft. You could make a better use of that in this stage.
Here's more info
Upvotes: 3