projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '18691-freeze-project'
[arvados.git]
/
tools
/
salt-install
/
config_examples
/
single_host
/
single_hostname
/
pillars
/
nginx_passenger.sls
diff --git
a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls
b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls
index a4d3c34f260e3cb5905830c40e19388f31561415..c25720c60a5fb17bc7aa3d5199a6ba79b82066db 100644
(file)
--- a/
tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls
+++ b/
tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_passenger.sls
@@
-10,12
+10,12
@@
if grains.osfinger in ('CentOS Linux-7',) else
'/usr/lib/nginx/modules/ngx_http_passenger_module.so' %}
{%- set passenger_ruby = '/usr/local/rvm/rubies/ruby-2.7.2/bin/ruby'
if grains.osfinger in ('CentOS Linux-7',) else
'/usr/lib/nginx/modules/ngx_http_passenger_module.so' %}
{%- set passenger_ruby = '/usr/local/rvm/rubies/ruby-2.7.2/bin/ruby'
- if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04',) else
+ if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04',
'Debian-10'
) else
'/usr/bin/ruby' %}
### NGINX
nginx:
'/usr/bin/ruby' %}
### NGINX
nginx:
-
install_from_phusionpassenger
: true
+
__NGINX_INSTALL_SOURCE__
: true
lookup:
passenger_package: {{ passenger_pkg }}
### PASSENGER
lookup:
passenger_package: {{ passenger_pkg }}
### PASSENGER
@@
-25,11
+25,15
@@
nginx:
### SERVER
server:
config:
### SERVER
server:
config:
+ # As we now differentiate where passenger is required or not, we need to
+ # load this module conditionally, so we add this conditional just to use
+ # the same pillar file
+ {% if "install_from_phusionpassenger" == "__NGINX_INSTALL_SOURCE__" %}
# This is required to get the passenger module loaded
# In Debian it can be done with this
# include: 'modules-enabled/*.conf'
load_module: {{ passenger_mod }}
# This is required to get the passenger module loaded
# In Debian it can be done with this
# include: 'modules-enabled/*.conf'
load_module: {{ passenger_mod }}
-
+ {% endif %}
worker_processes: 4
### SNIPPETS
worker_processes: 4
### SNIPPETS
@@
-69,6
+73,16
@@
nginx:
### SITES
servers:
managed:
### SITES
servers:
managed:
- #
Remove default webserver
+ #
Update default config to redirect to https
default:
default:
- enabled: false
+ enabled: true
+ overwrite: true
+ config:
+ - server:
+ - server_name: _
+ - listen:
+ - 80 default_server
+ - location /.well-known:
+ - root: /var/www
+ - location /:
+ - return: '301 https://$host$request_uri'