-
-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to set the default listening port? #1350
Comments
From the readme: HTTPS only server If you have set ssl => true and also set listen_port and ssl_port to the same value on the server, you will have a single HTTPS server listening on ssl_port. To add a location to this server set ssl => true and ssl_only => true on the location |
@ubellavance Thanks, I was missing the ssl_only, which is rather silly since I did read that. It seems I can't add this to the server block, so I must add that parameter to the locations block? |
I can't remember if I ever had to create such a configuration but the readme says "If you have set ssl => true and also set listen_port and ssl_port to the same value on the server". What makes you think that you can't add this to the server block? I wouldn't make any sense to put that on a location block, it really belongs to the server block. |
EDIT: My apologies, I hadn't seen your last comment. I think my browser hadn't refreshed properly until I submitted this comment. I agree that it wouldn't make sense to add the ssl_only to the location block, yet thats what the documentation seem to imply:
If I do set that property on the server block, I just get an error saying it has no such property available: With ssl_only enabled, I'm still unable to be rid of Nginx's default.conf file. My yaml config is as follows:
Nginx still listens on port 80... |
@ubellavance I found the solution . Someone provided the answer in another post: #996 (comment) Just to quote it:
Thanks again for your help! |
I've created server resources in Hiera yaml and have it configured on port 443. I need NGINX to listen only on port 443, and NOT on port 80. That one will be in use by another listening server... Presently, I can not find a way to tell NGINX to stop listening on port 80. This configuration is defined in /etc/nginx/conf.d/default.conf.
This file appears to be static, and no matter what I define it always has a default server entry listening on port 80.
I'm considering using the puppet 'file' resource to set it as 'absent' so it gets deleted, but I'm sure this is not the proper way to handle this.
A little bit of help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: