1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
systemctl start caddy
a. System environment:
Ubuntu 22.04.1 LTS (AWS EC2)
b. Command:
systemctl reload caddy
c. Service/unit/compose file:
d. My complete Caddy config:
clsabs.exanmoke.com {
root * /var/www/html
file_server
route /io/* {
uri strip_prefix /io
reverse_proxy * https://www.example.co {
header_down -Content-Type
header_down Content-Type text/css
}
}
header {
Content-Type text/css
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
}
3. The problem I’m having:
Above are the configurations that I have made for a single domain just for testing the caddy server with reverse_proxy.
Clarification and is there any possibility:
I have a client list of 1000+ members, planning to increase it to 10,000+ maybe if it goes well.
So here is my question, Literally, a noob in server configuration so don’t take me wrong.
1, I will be using S3 bucket to load station HTML or js file for ever user, which is not a problem in caddy. But the issue is every user will have a separate sub-domain which is pointing to my IP address.
Example: Everyone will point a sub-domain to their main domain with my IP, Like x1x.example .com, x1x.example1 .com, x1x.example2 .com, and so on for unlimited depending on my user.
The question is I don’t like to Update the caddyfile everytime by visiting the server,
Is there any way I can load the config file of caddy from the S3 Bucket so that I can directly update the AWS with some script.
2, What about scaling of server, I may receive more request per sec, is that a horizontal scaling or vertical, because, I need to know how this works if one domain has 1M views per month and another has 10k views per month.
3, What’s the maximum req that Caddy can handle if I host in AWS EC2? is it scalable?
4, If caddyfile cant be severed from S3 bucket, How can i update the file or config directly from my application? is there any module to make this work easier.