Skip to content

Commit c76cc90

Browse files
committed
fix: nginx conf server name
1 parent 0b6f70f commit c76cc90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nginx.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,11 @@ server {
445445
server {
446446
listen 80;
447447

448-
server_name pull-*.preview.docs.apify.com;
448+
server_name ~^(?<subdomain>[^.]+)\.preview\.docs\.apify\.com$;
449449

450450
location / {
451-
rewrite ^/(.*)/$ https://s3.amazonaws.com/apify-docs-preview/pull-$host/$1/index.html permanent;
452-
rewrite ^/(.*[^./])$ https://s3.amazonaws.com/apify-docs-preview/pull-$host/$1.html permanent;
453-
rewrite ^/(.*)$ https://s3.amazonaws.com/apify-docs-preview/pull-$host/$1 permanent;
451+
rewrite ^/(.*)/$ https://s3.amazonaws.com/apify-docs-preview/$subdomain/$1/index.html permanent;
452+
rewrite ^/(.*[^./])$ https://s3.amazonaws.com/apify-docs-preview/$subdomain/$1.html permanent;
453+
rewrite ^/(.*)$ https://s3.amazonaws.com/apify-docs-preview/$subdomain/$1 permanent;
454454
}
455455
}

0 commit comments

Comments
 (0)