Skip to content
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

dream: Update configuration #523

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions salt/dream/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ useful commands for RBC Group:
- mc
- telnet

/usr/share/nginx/html:
/usr/share/nginx/dream:
git.latest:
- name: https://github.com/open-contracting/bi.dream.gov.ua
- user: root
- force_fetch: True
- force_reset: True
- branch: build
- rev: build
- target: /usr/share/nginx/html
- target: /usr/share/nginx/dream
- require:
- pkg: git

/usr/share/nginx/mdcp:
git.latest:
- name: https://github.com/open-contracting/bi.dream.gov.ua-mdcp
- user: root
- force_fetch: True
- force_reset: True
- branch: build
- rev: build
- target: /usr/share/nginx/mdcp
- require:
- pkg: git
37 changes: 28 additions & 9 deletions salt/nginx/files/sites/dream-bi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server{
server_name {{ servername }};

location /.well-known{
root /usr/share/nginx/html;
root /usr/share/nginx/dream;
}
location /{
return 301 https://$host$request_uri;
Expand Down Expand Up @@ -39,10 +39,10 @@ server{
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/{{ servername }}/chain.pem;
client_max_body_size 20M;
root /usr/share/nginx/html;
root /usr/share/nginx/dream;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
root /usr/share/nginx/dream;


}
Expand Down Expand Up @@ -76,10 +76,23 @@ client_max_body_size 20M;
proxy_http_version 1.1;
}
location /monitor{
return 302 https://{{ servername }}/audit/sense/app/{{ app }}/overview;
return 302 https://{{ servername }}/auth/sense/app/{{ app }}/overview;
}
location /audit{
proxy_pass https://{{ proxypass }}:444/audit;
# location /audit{
# proxy_pass https://159.69.67.60:444/audit;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_max_temp_file_size 0;
# proxy_connect_timeout 15;
# proxy_read_timeout 1h;
# proxy_http_version 1.1;
# }
#######VP with Auth for audit app and MDCP#######
location /auth{
proxy_pass https://{{ proxypass }}:444/auth;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
Expand All @@ -93,7 +106,6 @@ client_max_body_size 20M;




######################################################


Expand Down Expand Up @@ -123,7 +135,7 @@ client_max_body_size 20M;
proxy_read_timeout 1h;
proxy_http_version 1.1;
}
location /prod/prtinting{
location /prod/printing{
proxy_pass https://{{ proxypass }}:444/prod/printing;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -208,6 +220,13 @@ client_max_body_size 20M;
try_files $uri $uri/ /afghanistan/index.html;
}

location /mdcp{
root /usr/share/nginx;
# try_files $uri $uri/../mdcp /../mdcp/index.html;
index index.html;

}

#location / {
# rewrite ^(.*)$ https://$http_host/$1 redirect;
# if ($http_host ~* "^bi.open-contracting.org"){
Expand All @@ -222,4 +241,4 @@ client_max_body_size 20M;
}


}
}