Comments (3)
1st I need to use the auto_https disable_redirects or else it throws error.
What error?
Is there any plugin or utility which can help to configure this local domains automatically?
I've often thought this would make a great Caddy plugin :) If anyone wants to build it!
But for now I've found that editing a hosts file is not a bad way to go.
from caddy.
There is a good npm package which does this - https://www.npmjs.com/package/hotel
I am not so good yet in developing something on my own like the plugin you said. But yes if this kind of plugin is there, it will boon for developers to test an app locally.
Also, a good use case could be creating MVPs for client, where they can actually mock the website locally. But again as you said, modifying hosts file in windows is also a good option but the problem with it is we cannot configure wildcard domains.
like below
127.0.0.4 *.test.local
something like hotel can be incredible addon (plugin) for local development.
Anyways, thanks again for your wonderful work and quick responses.
from caddy.
Got a different solution, please close the issue if you want. I was able to work with below configuration.
{
auto_https disable_redirects
}
localhost {
respond "Caddy server is running "
}
localhost:2016 {
respond "Hello World !!! !!!"
}
test.localhost {
respond "testing test.localhost domain"
}
myserver-127-0-0-6.sslip.io {
respond "checking sslipio for local sites"
tls internal
}
from caddy.
Related Issues (20)
- After renaming basicauth to basic_auth directive Caddyfile fails to load if custom salt argument was used HOT 16
- Caddy does not save configs automatically HOT 6
- [file_server browse] Layout setting is not saved HOT 12
- vars not expanded in path directives HOT 6
- Global option acme_dns doesn't work with global option cert_issuer HOT 2
- proxy_protocol in the global settings does not work HOT 6
- file.* global replacements trailing newline interaction with secrets HOT 3
- Load balancer sticky cookie should have a Max-Age configuration HOT 4
- Add Placeholders for forward_proxy_url HOT 1
- Feature Request: Support for SSH Protocol Forwarding HOT 1
- consider allowing global configuration in imported files HOT 2
- `basic_auth` does not work with environment variable substitution HOT 5
- readiness probe HOT 3
- Question about punycode/internationalized domains HOT 3
- HelloGitHub Badge
- [file_server] Incorrect file size calculation HOT 9
- Reverse proxy startup health check behavior results in 503 errors HOT 5
- Active health check logs on every check instead of state change HOT 1
- How to build a custom image with PHP-FPM 7.2/7.3/7.4 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy.