|
|
Hi, this is pretty much how I have mine setup - so am I right in thinking, you have to either start the service manually ( or via a script ) or run it as a daemon ?
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
No other way on Linux...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Thank you very much for clarifying
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
My Entire production setup at www.digital-solutions.me.uk all uses Nginx
Well Mostly... uses Nginx
First up I have a wildcard domain, so *.digital-solutions.me.uk will ALWAYS hit my public IP address same with my personal domain too.
My Firewall has exactly ONE port forward on port 80 and that hit's a VM running on hyper-v, the VM is a linux server install, that runs only Nginx nothing else.
In the config for Nginx I list all my subdomains as virtual servers, and then in those virtual servers I proxy the connection to other servers,desktops,IoT devices, containers and VM's some of which run dotnet core apps, some which run Apache, and some which serve classic .NET apps from an IIS instance.
The first VM to be hit is responsible for routing to the correct destination machine, I find that Nginx works perfectly and it can handle traffic through put really well too.
It's routes to Windows, Linux, Bsd all manner of target systems, even Solaris
Anything that's not in the Nginx config for the frontend VM just get's blackholed and a reply is never sent for it.
Those VMs that DO run dotnet core services on them, I keep the services running using SupervisorD: Supervisor: A Process Control System — Supervisor 4.1.0 documentation
Shawty
Still Crazy.... Best and ONLY way to be.
|
|
|
|
|
Thanks for this could I see your nginx.conf - I'm keen to learn this stuff
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
Yes sure, but for obvious reasons I'm not posting it publicly.
Hunt me down on twitter I'm @shawty_ds
We'll take it from there.
I'm off to cook evening meal for the family right now, but I'll be back at my PC either in a few hours (Or tomorrow if I end up watching TV with the wife and drinking beer .... )
You can also find me on gmail as "shawty.d.ds"
Regards
Shawty
|
|
|
|
|
I don't use twitter have you an email address I can use ?
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
As I said in my last post
Im shawty.d.ds on gmail
|
|
|
|
|
Didn't see an email from you yet.... just making sure
shawty.d.ds at gmail
|
|
|
|
|
If you are using WebHostBuilder with UseKestrel() you don't need NGinx.
To make sure it starts automatically or restarts on a crash on most Linux systems you would use systemd.
Manage Kestrel process with systemd
|
|
|
|
|
That may be, but all the advice I've seen to date, even the official MS stuff, states that you should NEVER place a dotnet core app directly on a public facing IP as kestrel is not built to take the onslaught that more mature web servers are.
It's always been best advice to proxy the inbound traffic to a dotnet core app, allowing you to take advantage of all sorts of things that kestrel doesn't do, such as virtual hosting and the many battle hardened security features these server apps have built into them.
|
|
|
|
|
Hi Peter, thanks for the stuff you sent me although it's largely over my head - did you see my question in the General Programming C# category regarding asking how to expose my locally hosted service to remote clients ?
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
It's easy once you know how
RE: Question, nope... you wanna spin me a link?
Shawty
|
|
|
|
|
My Question
Edit
n.b Nginx and the API service are on the same box
I just worked it out, nginx is listening to port 80 on my API box then proxy passing to the API service - so I need to port forward an external port on my router to port 80 on my API box- I have and it works - thanks for your help - do you mind if I bombard you with net core questions ?
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
modified 22-Apr-20 16:40pm.
|
|
|
|
|
Is a dog with a big hammer Labrathor?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Of course not. You must be barking mad!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
That was so bad, someone might take Beagle action against you!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Are you Frigga nuts? That's Balder-dash!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
Loki here you ... call me nuts again and I'll raise such an Odin!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
So you're saying he should Tíws his next words carefully?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Is it throwing a spanner* into the works if I bring up a Wrench Poodle?
* should have used spaniel, but I leave it to you for an exercise.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
By thunder, who saw that coming? It just Frigga amazing!
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Are you Tiwaz-ing us?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|