-
so i have this domain in the manage user i override the domain from zip.example.com to files.example.com but for some reason files.example.com just showing blank pages i'm using caddy and here's my caddyfile
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
i dont know how caddy works so I'll try explaining in a way that is general I guess. lets say you have your main domain you send upload requests from: to make this work you need to make sure that up.example.com points to the same adress as file.example.com, whether it's through your registrars dns or caddy/nginx/apache (or anything else). for example, since im familiar with nginx you would do the following: server {
listen 80 default_server;
client_max_body_size 100M;
server_name up.example.com file.example.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
} then in my dns settings in cloudflare or my registrar i would put it's important that they point to the same ip, as previously stated! |
Beta Was this translation helpful? Give feedback.
i dont know how caddy works so I'll try explaining in a way that is general I guess. lets say you have your main domain you send upload requests from:
img.example.com
[POST https://up.example.com/api/upload, Headers: (all the necessary shit +Override-Domain: file.example.com
)] - this will outputhttps://file.example.com/u/file.ext
instead ofhttps://up.example.com/u/file.ext
(the default).to make this work you need to make sure that up.example.com points to the same adress as file.example.com, whether it's through your registrars dns or caddy/nginx/apache (or anything else).
for example, since im familiar with nginx you would do the following: