-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
- Loading branch information
Showing
3 changed files
with
82 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,86 @@ | ||
--- 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 *:8080 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 *:8443 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_verify off; | ||
|
||
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_verify off; | ||
|
||
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_verify off; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
@@ -164,4 +167,4 @@ | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
} | ||
-} | ||
+} | ||
\ No newline at end of file |