mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
Clean up our nginx configuraiton to make better use of app.d.
Now app.d is something that any app frontend will read, and we just have secondary manifests add additional files to the app.d directory for custom stuff. This fixes the issue that we were incorrectly including the lb0-related app configuration in the enterprise version. (imported from commit dec8dcdf2506b82e51186ff936c26dc1cd6cf61b)
This commit is contained in:
@@ -24,5 +24,4 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
include /etc/nginx/zulip-include/app;
|
include /etc/nginx/zulip-include/app;
|
||||||
include /etc/nginx/zulip-include/app.d/*.conf;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,4 @@ location / {
|
|||||||
fastcgi_max_temp_file_size 0;
|
fastcgi_max_temp_file_size 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
real_ip_header X-Forwarded-For;
|
include /etc/nginx/zulip-include/app.d/*.conf;
|
||||||
# lb0.zulip.net elastic IP
|
|
||||||
set_real_ip_from 54.213.41.54;
|
|
||||||
|
|||||||
@@ -74,6 +74,12 @@ class zulip::app_frontend {
|
|||||||
source => "puppet:///modules/zulip/nginx/zulip-include/",
|
source => "puppet:///modules/zulip/nginx/zulip-include/",
|
||||||
notify => Service["nginx"],
|
notify => Service["nginx"],
|
||||||
}
|
}
|
||||||
|
file { "/etc/nginx/zulip-include/app.d/":
|
||||||
|
ensure => directory,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
mode => 755,
|
||||||
|
}
|
||||||
file { "/etc/memcached.conf":
|
file { "/etc/memcached.conf":
|
||||||
require => Package[memcached],
|
require => Package[memcached],
|
||||||
ensure => file,
|
ensure => file,
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ class zulip::localhost_sso {
|
|||||||
group => "root",
|
group => "root",
|
||||||
mode => 644,
|
mode => 644,
|
||||||
notify => Service["nginx"],
|
notify => Service["nginx"],
|
||||||
source => "puppet:///modules/zulip/nginx/zulip-include/app.d/external-sso.conf",
|
source => "puppet:///modules/zulip/nginx/zulip-include-app.d/external-sso.conf",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Configuration for making our app frontends accept the
|
||||||
|
# X-Forwarded-For header from our load balancers. We need to update
|
||||||
|
# the IP addresses here whenever we add new loadbalancer machines.
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
# lb0.zulip.net elastic IP
|
||||||
|
set_real_ip_from 54.213.41.54;
|
||||||
@@ -10,4 +10,13 @@ class zulip_internal::app_frontend {
|
|||||||
]
|
]
|
||||||
package { $app_packages: ensure => "installed" }
|
package { $app_packages: ensure => "installed" }
|
||||||
|
|
||||||
|
file { "/etc/nginx/zulip-include/app.d/accept-loadbalancer.conf":
|
||||||
|
require => Package["nginx-full"],
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
mode => 644,
|
||||||
|
source => "puppet:///modules/zulip_internal/nginx/zulip-include-app.d/accept-loadbalancer.conf",
|
||||||
|
notify => Service["nginx"],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user