Skip to content

Commit 84c9388

Browse files
authored
chore: configuration for docs-preview (#1518)
- nginx configuration for apify-docs-preview - everything pointed to *.preview.docs.apify.com domain will be proxied to the apify-docs-preview S3 bucket directly. It will be used for "staging/preview" documentation
1 parent 401f243 commit 84c9388

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

nginx.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,21 @@ server {
441441
# Redirect rule so that /python/docs actually leads somewhere
442442
rewrite ^/python/docs/?$ /python/docs/quick-start;
443443
}
444+
445+
server {
446+
listen 0.0.0.0:8080;
447+
448+
server_name ~^(?<subdomain>[^.]+)\.preview\.docs\.apify\.com$;
449+
450+
location ~ ^/(.*)/$ {
451+
proxy_pass https://s3.amazonaws.com/apify-docs-preview/$subdomain/$1/index.html;
452+
}
453+
454+
location ~ ^/(.*[^./])$ {
455+
proxy_pass https://s3.amazonaws.com/apify-docs-preview/$subdomain/$1.html;
456+
}
457+
458+
location / {
459+
proxy_pass https://s3.amazonaws.com/apify-docs-preview/$subdomain/;
460+
}
461+
}

0 commit comments

Comments
 (0)