Re: Nginx only serves 1 App

2018-05-23 Thread Nginx-Chris
Hi Moshe This works absolutely perfect. Thank you so much for letting me (us) know how to use the config arrangement. Let me summarize the steps also for other users that might stumble over this thread (and please feel free to correct/improve if required). After performing the certbot command th

Re: Nginx only serves 1 App

2018-05-23 Thread Moshe Katz
Here's how you would do it: First, run this command (substituting your example of `new.page.com` for any other new domain): certbot certonly --webroot -w /usr/share/nginx/html -d new.page.com *Note that the "webroot" directory is the same for ALL sites here, because of these lines: https://gist

Re: Nginx only serves 1 App

2018-05-23 Thread Nginx-Chris
I mean how would the nginx config for new.page.com look like? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279794,279935#msg-279935 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Nginx only serves 1 App

2018-05-23 Thread Nginx-Chris
Hi Moshe I wanted to come back to you again to thank you very much. I changed my nginx config file arrangement according to your proposal on https://gist.github.com/kohenkatz/08a74d757e0695f4ec3dc34c44ea4369#file-redirect-all-http-to-https-conf And I think it's awesome :-) Very well structured

Re: Nginx only serves 1 App

2018-05-16 Thread Moshe Katz
Somehow we all missed that - of course you can't run `http2` on port 80 and have it work since `http2` requires SSL. With that configuration, you would have been able to get to the chat subdomain only by going to `https:// chat.mydomain .com:80/` - notice that it is https but is forced back to port

Re: Nginx only serves 1 App

2018-05-15 Thread Nginx-Chris
Here is what makes everything work ok: In the cloud.conf (Seafile) I deleted the "http2" in the server part that listens on port 80 and redirects. It looks like this now: server { listen 80; listen [::]:80; server_name cloud.mydomain.com; rewrite ^ https://$http_host$re

Re: Nginx only serves 1 App

2018-05-15 Thread Nginx-Chris
The config that you propose does not require to switch nginx off for letsencrypt refreshs, correct? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279794,279810#msg-279810 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailm

Re: Nginx only serves 1 App

2018-05-15 Thread Nginx-Chris
Thanks a lot Moshe for all the efforts. The gist is pretty cool. I will check it out and have a go with it. I will also look closer at the config: > include /etc/letsencrypt/options-ssl-nginx.conf; Maybe there is something in there that's strange. I will get back to you here in this thread.

Re: Nginx only serves 1 App

2018-05-15 Thread Moshe Katz
That last "# managed by Certbot" section looks wrong - it shouldn't be using "if ($host = ...", since that's inefficient and there are much better ways to do it. I have a very similar server, so here are the config files I use for it. I don't like pasting them into emails, so I made a GitHub Gist:

Re: Nginx only serves 1 App

2018-05-15 Thread Nginx-Chris
Dear Moshe I did switch off the seafile configuration and that means that the normal chat.mydomain.com works again with nginx., I did then do > sudo certbot --nginx and the sitechat.mydomain.com now runs on with SSL. So then I switch seafile conf on again --> Seafile works as always. AND mat

Re: Nginx only serves 1 App

2018-05-15 Thread Moshe Katz
Looks to me like your problem is that Seafile is using HTTPS but Mattermost is not. That said, I don't understand how you are able to get to Mattermost at all, since you are setting HSTS headers that should prevent your browser from going to a non-secure page on your domain. Add HTTPS configurati

Re: Nginx only serves 1 App

2018-05-15 Thread Friscia, Michael
What happens if you only use one config file and put all of that in it? Nothing really stands out to me in your config. I run about 600 domain names through one Nginx server with many sub-domains in separate server blocks. I've had issues where a subdomain was not served correctly before. I end

Nginx only serves 1 App

2018-05-15 Thread Nginx-Chris
Root Server with Ubuntu 16.04. Nginx Version: 1.10.3 I have an Nginx server that serves 1 Application: An open source Cloud Server from Seafile that listens on cloud.mydomain.com I now tried to add another Application to my server: A Mattermost server that should listen on chat.mydomain.com When