configured proxy for nginx
This commit is contained in:
parent
58b995e6ca
commit
ea90b1a1f5
@ -1,37 +1,43 @@
|
|||||||
server {
|
http {
|
||||||
listen 8080;
|
server {
|
||||||
proxy_hide_header WWW-Authenticate;
|
listen 8080;
|
||||||
root /usr/share/nginx/html;
|
proxy_hide_header WWW-Authenticate;
|
||||||
location / {
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
location / {
|
||||||
expires -1;
|
index index.html;
|
||||||
proxy_hide_header WWW-Authenticate;
|
expires -1;
|
||||||
try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
|
proxy_hide_header WWW-Authenticate;
|
||||||
}
|
try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
|
||||||
location /project {
|
}
|
||||||
proxy_pass $API_URL
|
location /project {
|
||||||
}
|
proxy_pass $API_URL;
|
||||||
location /reanalyse {
|
}
|
||||||
proxy_pass $API_URL
|
location /reanalyse {
|
||||||
|
proxy_pass $API_URL;
|
||||||
|
}
|
||||||
|
location /upload {
|
||||||
|
proxy_pass $API_URL;
|
||||||
|
}
|
||||||
|
location /download {
|
||||||
|
proxy_pass $API_URL;
|
||||||
|
}
|
||||||
|
location /delete {
|
||||||
|
proxy_pass $API_URL;
|
||||||
|
}
|
||||||
|
location /status {
|
||||||
|
proxy_pass $API_URL;
|
||||||
|
}
|
||||||
|
gzip_min_length 1000;
|
||||||
|
gzip on;
|
||||||
|
gzip_http_version 1.0;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_types application/javascript text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
}
|
}
|
||||||
location /upload {
|
}
|
||||||
proxy_pass $API_URL
|
|
||||||
}
|
events {
|
||||||
location /download {
|
# configuration of connection processing
|
||||||
proxy_pass $API_URL
|
|
||||||
}
|
|
||||||
location /delete {
|
|
||||||
proxy_pass $API_URL
|
|
||||||
}
|
|
||||||
location /status {
|
|
||||||
proxy_pass $API_URL
|
|
||||||
}
|
|
||||||
gzip_min_length 1000;
|
|
||||||
gzip on;
|
|
||||||
gzip_http_version 1.0;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_buffers 16 8k;
|
|
||||||
gzip_types application/javascript text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,4 +12,12 @@ echo '{
|
|||||||
"API_URL":"'"$API_URL"'"
|
"API_URL":"'"$API_URL"'"
|
||||||
}' > /usr/share/nginx/html/assets/config/config.json
|
}' > /usr/share/nginx/html/assets/config/config.json
|
||||||
|
|
||||||
envsubst '$API_URL' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'
|
envsubst '$API_URL' < /nginx.conf.template > /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
cho 'Env variables: '
|
||||||
|
cat /usr/share/nginx/html/assets/config/config.json
|
||||||
|
|
||||||
|
echo 'Running with config: '
|
||||||
|
cat /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
nginx -g 'daemon off;'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user