-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow st2web to run as non-root w/o privileges
Co-authored-by: Jacob Floyd <[email protected]>
- Loading branch information
1 parent
cebea8d
commit 754423c
Showing
4 changed files
with
88 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,79 @@ | ||
--- st2.conf 2021-06-18 19:45:50.892196136 +0100 | ||
+++ st2.https.conf 2021-06-18 19:45:50.884196198 +0100 | ||
@@ -20,8 +20,8 @@ | ||
--- st2.conf 2023-09-18 15:03:31.000000000 +0100 | ||
+++ st2.https.conf 2023-09-18 15:12:35.000000000 +0100 | ||
@@ -7,7 +7,7 @@ | ||
# see https://docs.stackstorm.com/install.html for details | ||
|
||
server { | ||
- listen *:80 default_server; | ||
+ listen *:${ST2_PORT_HTTP} default_server; | ||
|
||
add_header Front-End-Https on; | ||
add_header X-Content-Type-Options nosniff; | ||
@@ -20,12 +20,12 @@ | ||
} | ||
index index.html; | ||
|
||
- access_log /var/log/nginx/st2webui.access.log combined; | ||
- error_log /var/log/nginx/st2webui.error.log; | ||
+ access_log /proc/self/fd/1 combined; | ||
+ error_log stderr; | ||
} | ||
|
||
server { | ||
- listen *:443 ssl; | ||
+ listen *:${ST2_PORT_HTTPS} ssl; | ||
server_tokens off; | ||
|
||
if ($request_method !~ ^(GET|HEAD|POST|PUT|DELETE|OPTIONS)$ ) { | ||
@@ -42,8 +42,8 @@ | ||
|
||
index index.html; | ||
|
||
- access_log /var/log/nginx/ssl-st2webui.access.log combined; | ||
- error_log /var/log/nginx/ssl-st2webui.error.log; | ||
+ access_log /proc/self/fd/1 combined; | ||
+ error_log stderr; | ||
|
||
add_header Front-End-Https on; | ||
add_header X-Content-Type-Options nosniff; | ||
@@ -61,7 +61,7 @@ | ||
@@ -61,10 +61,11 @@ | ||
|
||
rewrite ^/api/(.*) /$1 break; | ||
|
||
- proxy_pass http://127.0.0.1:9101/; | ||
+ proxy_pass ${ST2_API_URL}; | ||
proxy_read_timeout 90; | ||
proxy_connect_timeout 90; | ||
proxy_redirect off; | ||
@@ -99,7 +99,7 @@ | ||
|
||
+ proxy_ssl_trusted_certificate ${ST2_CA_CERT}; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
@@ -99,12 +100,13 @@ | ||
|
||
rewrite ^/stream/(.*) /$1 break; | ||
|
||
- proxy_pass http://127.0.0.1:9102/; | ||
+ proxy_pass ${ST2_STREAM_URL}; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
@@ -138,7 +138,7 @@ | ||
|
||
proxy_read_timeout 200; | ||
proxy_connect_timeout 200; | ||
+ proxy_ssl_trusted_certificate ${ST2_CA_CERT}; | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
@@ -138,10 +140,11 @@ | ||
|
||
rewrite ^/auth/(.*) /$1 break; | ||
|
||
- proxy_pass http://127.0.0.1:9100/; | ||
+ proxy_pass ${ST2_AUTH_URL}; | ||
proxy_read_timeout 90; | ||
proxy_connect_timeout 90; | ||
proxy_redirect off; | ||
+ proxy_ssl_trusted_certificate ${ST2_CA_CERT}; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; |