Comments (16)
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.
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.
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.
@3flex thanks for sharing the rationale. I'm not a fan of big monolithic files. Hopefully #167 will be merged soon.
from puppet-nginx.
Hi @oligriffiths, can you please close this issue if there's nothing outstanding?
from puppet-nginx.
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.
Can you provide an example with the file/folder structure you intend to use? I'm not familiar with puphpet.
from puppet-nginx.
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.
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.
@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.
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.
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.
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.
Or do you want the support added here first so PuPHPet can leverage it?
from puppet-nginx.
Exactly. If it's possible to specify the path to a custom vhost declaration, then PuPHPet could add support for it.
from puppet-nginx.
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)
- documenting the email reverse proxy configuration
- Default package_ensure value is not compatible with current stdlib default for ensure_packages() HOT 3
- stream logging is broken by default HOT 2
- Unable to set valid Unix socket as upstream server
- REFERENCE's internal links are broken HOT 3
- access log inside rewrite_www_to_non_www and rewrite_non_www_to_www HOT 3
- custom stream_log not properly defined HOT 1
- Allow puppetlabs-concat 8 HOT 2
- Good SSL configuration by default HOT 3
- Allow multiple parameters for gzip_proxied
- limit_zone should take Array in addition to String and Undef HOT 1
- proxy_cache_path should allow different values for its settings when an hash is used.
- Documentation of "proxy_set_header Proxy" field
- Remove deprecated `ssl` directive HOT 5
- [DOC] add examples for `limit_conn` and `limit_req`
- Support ssl_reject_handshake and ssl_early_data
- FeatureRequest: AmazonLinux support
- [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in [from nginx 1.25.1 onwards] HOT 8
- add `host_core` fixture for acceptance tests
- `nginx::string_mappings` in last tag v6.0.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-nginx.