Git Product home page Git Product logo

Comments (16)

3flex avatar 3flex commented on July 4, 2024

You can put it in /etc/nginx/conf.d/ with a .conf extension. The configuration will then be included in the http context when the server is reloaded/restarted.

from puppet-nginx.

cyrusstoller avatar cyrusstoller commented on July 4, 2024

Out of curiosity, is there a reason that conf files are put in the /etc/nginx/conf.d directory instead of /etc/nginx/sites-enabled? I see that that the line that links to sites-enabled was explicitly removed in config.pp.

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

Hi @oligriffiths, would you consider closing this issue if there's nothing else outstanding?

@cyrusstoller Are you talking about the vhost configuration? I think that's put there because the way the module currently works is all vhost configurations are combined into a single file, so it doesn't make sense to put it in sites-enabled since it would be a single monolithic file rather than being split out as they should be in that directory.

PR #167 will stop creating a single monolithic file and split things up by vhost. If/when that's merged someone could look at putting the vhost configs in sites-enabled.

from puppet-nginx.

cyrusstoller avatar cyrusstoller commented on July 4, 2024

@3flex thanks for sharing the rationale. I'm not a fan of big monolithic files. Hopefully #167 will be merged soon.

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

Hi @oligriffiths, can you please close this issue if there's nothing outstanding?

from puppet-nginx.

oligriffiths avatar oligriffiths commented on July 4, 2024

Sorry, I didn't see your previous comment. I don't think this answers my question, perhaps I need to be clearer.

I contacted https://puphpet.com about allowing for the nginx configuration to reside within the project files (such that they can be bundled with the project and kept under VC). They said it should be possible but I should contact you.

So what I want to be able to do is to have my nginx config included within the package that puphpet generates (vhost names, routing, config options, etc)

Is this possible?

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

Can you provide an example with the file/folder structure you intend to use? I'm not familiar with puphpet.

from puppet-nginx.

oligriffiths avatar oligriffiths commented on July 4, 2024

Hi

I'm not quite sure who to direct this at to be honest. I was directed from here puphpet/puphpet#166

Perhaps @puphpet could provide some clarification?

Thanks

from puppet-nginx.

binhnv avatar binhnv commented on July 4, 2024

I am trying to do the same thing that oligriffiths is trying to do but I don't think it is possible with the current code. Basically I have a ready for use vhost configuration file and I just want to copy it to server without any change. I can't find the way to do it if I want to use nginx::resource::vhost

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

@oligriffiths @binhnv I'm still not following, be aware that I am 100% unfamiliar with PuPHPet. It sounds like something that may be useful, but I'm trying to understand exactly what the requirements are and whether any changes are in scope for this module.

Are you saying that you want to use the nginx::resource::vhost type, but do something like:

nginx::resource::vhost { 'puphpet':
  custom_file => '/path/to/custom/file'
}

and then have that file copied to /etc/nginx/sites-available just like the other vhost configs would be? Or are you trying to just link to the file from nginx somehow, and not copy the config to sites-available?

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

I'm closing this for now. @oligriffiths @binhnv please comment if you have any information to add and I'll reopen. Thanks!

from puppet-nginx.

oligriffiths avatar oligriffiths commented on July 4, 2024

Sorry for not replying. Yeah that's pretty much what im talking about. That way a general puppet config for the box can be created, but the vhost information for the specific application can be loaded from a file within a project directory for example, that way the nginx config for myapp.com can live within the myapp repo.

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

How would you reference that custom file from PuPHPet? That won't happen automatically, you still need to copy the file somehow and PuPHPet doesn't support doing that automatically from what I can tell.

from puppet-nginx.

3flex avatar 3flex commented on July 4, 2024

Or do you want the support added here first so PuPHPet can leverage it?

from puppet-nginx.

oligriffiths avatar oligriffiths commented on July 4, 2024

Exactly. If it's possible to specify the path to a custom vhost declaration, then PuPHPet could add support for it.

from puppet-nginx.

wyardley avatar wyardley commented on July 4, 2024

It also might be nice to support custom vhost templates, and this might be another way of supporting something like what you're talking about.

Between the custom_cfg and raw appends / prepends for locations, I've found it possible to do a lot of custom things, but it should also be possible to just push the file outside of the module if that's your goal. Since conf.d and the sites-enabled directories are already included, you can also put files there from outside of the module, and they'll be included (being mindful of $vhost_purge / $confd_purge settings).

from puppet-nginx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.