abusesa: Add support for AbuseSA services
This commit is contained in:
parent
b77decaf8a
commit
73c505981a
2 changed files with 87 additions and 0 deletions
33
abusesa/templates/services/nginx.conf.erb
Normal file
33
abusesa/templates/services/nginx.conf.erb
Normal file
|
@ -0,0 +1,33 @@
|
|||
log_format abusesa '$remote_addr - $http_x_remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
server {
|
||||
listen 8443;
|
||||
|
||||
access_log <%= scope.lookupvar('nginx::logdir') %>/abusesa.log abusesa;
|
||||
|
||||
ssl on;
|
||||
ssl_verify_client on;
|
||||
ssl_certificate <%= @puppet_ssldir %>/certs/<%= @homename %>.pem;
|
||||
ssl_certificate_key <%= @puppet_ssldir %>/private_keys/<%= @homename %>.pem;
|
||||
ssl_client_certificate <%= @puppet_ssldir %>/certs/ca.pem;
|
||||
|
||||
proxy_buffering off;
|
||||
|
||||
<% @services.each do |service|
|
||||
dir, sep, sock = service.rpartition('/')
|
||||
dir = @socketdir if dir.empty?
|
||||
sockpath = File.join(dir, sock)
|
||||
location = sock.gsub('.', '/')
|
||||
-%>
|
||||
location /<%= location %>/ {
|
||||
proxy_pass http://unix:<%= sockpath %>:/;
|
||||
}
|
||||
|
||||
<% end -%>
|
||||
location / {
|
||||
deny all;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue