Skip to content
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

Add sites-enabled folder usage #340

Closed

Conversation

hasanalihaolader
Copy link

  • Added sites-enabled folder due to availability for virtual host configuration
  • Moved default configuration conf.d to site-enabled cause all enabled site virtual hosts in the server could be available in the site-enabled folder and conf.d folder available to another custom nginx configuration.

@LeoColomb
Copy link
Member

Thanks for this pull request @hasanalihaolader.
That said I'm not sure to get the point of the change.
Virtual hosts can be easily configured in the conf.d folder, which is the standard one for Nginx.
Also, the current status of the default vhost is being disabled, and this is on purpose.

Thus, could you clarify?

@hasanalihaolader
Copy link
Author

hasanalihaolader commented Oct 26, 2023

Thanks for this pull request @hasanalihaolader. That said I'm not sure to get the point of the change. Virtual hosts can be easily configured in the conf.d folder, which is the standard one for Nginx. Also, the current status of the default vhost is being disabled, and this is on purpose.

Thus, could you clarify?

@LeoColomb Nginx default configuration has the site-enabled folder, and it is possible to v-host configure in site-enabled. Just adopt this configuration, so at this moment, it is possible to v-host configuration in conf.d and site-enabled both.

site-enabled folder ensures v-host configuration for which site is enabled in this server.
another point is that the default configuration is not disabled. You see, the default configuration is in a site-enabled folder, so the default site is enabled for this server.

my purposes are clearly visible, such as which site is enabled on the server and the nginx default configuration structure adoption.
and minimize nested v-host configuration like if multiple site configuration in one .cnf is not clearly visible where this site configuration has.

@muuvmuuv
Copy link

Back in Apache days, I have seen this as well, but NGINX if far better to configure. You can simply append an .off to the host name to turn it “off” and include it using a proper regex. I don't see the need here to use an old pattern. And I had never the use of turning hosts off, since these configurations are mostly “set it and forget it”.

@hasanalihaolader
Copy link
Author

Back in Apache days, I have seen this as well, but NGINX if far better to configure. You can simply append an .off to the host name to turn it “off” and include it using a proper regex. I don't see the need here to use an old pattern. And I had never the use of turning hosts off, since these configurations are mostly “set it and forget it”.

is not old configuration, is default configuration during install fresh nginx.

@LeoColomb LeoColomb changed the title Feature/nginx.conf Add sites-enabled folder usage Oct 26, 2023
@LeoColomb
Copy link
Member

Do you have any official documentation that illustrates the sites-enabled as a standard Nginx pattern?

I'm also quite skeptical, to be honest. That's why I'm closing this pull request.
But I'd be happy to reopen if any material is provided to support this change.
Meanwhile, you are of course free to use the pattern of your preference on your deployments.

@LeoColomb LeoColomb closed this Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants