-
-
Notifications
You must be signed in to change notification settings - Fork 32
Make st2web use HTTP by default #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8fa8742
Make st2web use HTTP by default
warrenvw 5a2f88b
Add missing patch files
warrenvw 76ad99c
Clean-up CMD
warrenvw 8da0928
Remove old st2.conf.patch file
warrenvw 03379ee
Fix typo in error_log value
warrenvw 82291db
Update README with reference to ST2WEB_HTTPS var
warrenvw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| --- /etc/nginx/conf.d/st2.template 2019-05-27 14:11:20.000000000 -0700 | ||
| +++ /etc/nginx/conf.d/st2.conf 2019-05-27 14:22:28.000000000 -0700 | ||
| @@ -1,6 +1,6 @@ | ||
| # | ||
| -# nginx configuration to expose st2 webui, redirect HTTP->HTTPS, | ||
| -# provide SSL termination, and reverse-proxy st2api and st2auth API endpoint. | ||
| +# nginx configuration to expose st2 webui, and reverse-proxy the st2api and | ||
| +# st2auth API endpoints. | ||
| # To enable: | ||
| # cp ${LOCATION}/st2.conf /etc/nginx/sites-available | ||
| # ln -l /etc/nginx/sites-available/st2.conf /etc/nginx/sites-enabled/st2.conf | ||
| @@ -9,39 +9,12 @@ | ||
| server { | ||
| listen *:80 default_server; | ||
|
|
||
| - add_header Front-End-Https on; | ||
| add_header X-Content-Type-Options nosniff; | ||
|
|
||
| - if ($ssl_protocol = "") { | ||
| - return 308 https://$host$request_uri; | ||
| - } | ||
| - | ||
| - index index.html; | ||
| - | ||
| - access_log /var/log/nginx/st2webui.access.log combined; | ||
| - error_log /var/log/nginx/st2webui.error.log; | ||
| -} | ||
| - | ||
| -server { | ||
| - listen *:443 ssl; | ||
| - | ||
| - ssl on; | ||
| - | ||
| - ssl_certificate /etc/ssl/st2/st2.crt; | ||
| - ssl_certificate_key /etc/ssl/st2/st2.key; | ||
| - ssl_session_cache shared:SSL:10m; | ||
| - ssl_session_timeout 5m; | ||
| - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
| - ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:AES128-GCM-SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:AES128-SHA:AES128-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4; | ||
| - ssl_prefer_server_ciphers on; | ||
| - | ||
| index index.html; | ||
|
|
||
| - access_log /var/log/nginx/ssl-st2webui.access.log combined; | ||
| - error_log /var/log/nginx/ssl-st2webui.error.log; | ||
| - | ||
| - add_header Front-End-Https on; | ||
| - add_header X-Content-Type-Options nosniff; | ||
| + access_log /proc/self/fd/1 combined; | ||
| + error_log st2derr; | ||
|
|
||
| location @apiError { | ||
| add_header Content-Type application/json always; | ||
| @@ -53,7 +26,7 @@ | ||
|
|
||
| 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; | ||
| @@ -83,7 +56,7 @@ | ||
|
|
||
| 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; | ||
| @@ -111,7 +84,7 @@ | ||
|
|
||
| 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; | ||
| @@ -136,4 +109,5 @@ | ||
| tcp_nopush on; | ||
| tcp_nodelay on; | ||
| } | ||
| + | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- /etc/nginx/conf.d/st2.template 2019-05-27 14:11:20.000000000 -0700 | ||
| +++ /etc/nginx/conf.d/st2.conf 2019-05-27 14:22:11.000000000 -0700 | ||
| @@ -18,8 +18,8 @@ | ||
arm4b marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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 { | ||
| @@ -37,8 +37,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; | ||
| @@ -53,7 +53,7 @@ | ||
|
|
||
| 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; | ||
| @@ -83,7 +83,7 @@ | ||
|
|
||
| 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; | ||
| @@ -111,7 +111,7 @@ | ||
|
|
||
| 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; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.