You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.4 KiB
57 lines
1.4 KiB
server { |
|
|
|
root /home/programmer/web-app/build; |
|
index index.html index.htm index.nginx-debian.html; |
|
|
|
server_name tasks.rwsbank.com.ua tasks-web-app.rwsbank.com.ua; |
|
|
|
location / { |
|
# First attempt to serve request as file, then |
|
# as directory, then fall back to redirecting to index.html |
|
try_files $uri $uri/ /index.html; |
|
} |
|
|
|
# Media: images, icons, video, audio, HTC |
|
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { |
|
access_log off; |
|
add_header Cache-Control "public"; |
|
} |
|
|
|
# Javascript and CSS files |
|
location ~* \.(?:css|js)$ { |
|
try_files $uri =404; |
|
access_log off; |
|
add_header Cache-Control "public"; |
|
} |
|
|
|
# Any route containing a file extension (e.g. /devicesfile.js) |
|
location ~ ^.+\..+$ { |
|
try_files $uri =404; |
|
} |
|
|
|
|
|
listen [::]:443 ssl; |
|
listen 443 ssl; |
|
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt; |
|
ssl_certificate_key /etc/ssl/rwsbank/com.key; |
|
|
|
|
|
} |
|
server { |
|
if ($host = tasks-web-app.rwsbank.com.ua) { |
|
return 301 https://$host$request_uri; |
|
} |
|
|
|
if ($host = tasks.rwsbank.com.ua) { |
|
return 301 https://$host$request_uri; |
|
} |
|
|
|
listen 80; |
|
listen [::]:80; |
|
|
|
server_name tasks-web-app.rwsbank.com.ua; |
|
return 404; |
|
|
|
|
|
} |
|
|
|
|