Skip to content

Commit

Permalink
Update documentation on falcon virtual (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
pharmac1st authored Feb 4, 2025
1 parent b73ec21 commit ef7dfee
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions guides/deployment/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,26 @@ graph TD;
You need to create a `falcon.rb` configuration in the root of your applications, and start the virtual host:

~~~ bash
$ cat /srv/http/example.com/falcon.rb
#!/usr/bin/env -S falcon host
cat /srv/http/example.com/falcon.rb
#!/usr/bin/env falcon-host

load :rack, :lets_encrypt_tls, :supervisor
require "falcon/environment/self_signed_tls"
require "falcon/environment/rack"
require "falcon/environment/supervisor"

rack 'hello.localhost', :lets_encrypt_tls
service "hello.localhost" do

supervisor
include Falcon::Environment::SelfSignedTLS
include Falcon::Environment::Rack

end

service "supervisor" do
include Falcon::Environment::Supervisor
end

$ falcon virtual /srv/http/example.com/falcon.rb
$ falcon virtual /srv/http/*/falcon.rb
~~~

The Falcon virtual server is hard coded to redirect http traffic to https, and will serve each application using an internal SNI-based proxy.
See the [docker example](https://github.com/socketry/falcon-virtual-docker-example).

0 comments on commit ef7dfee

Please sign in to comment.