Static Hosting

Ayllu can serve content directly from a git repository, you just need to toggle a few options in your git configuration file.

Example Configuration

In your git configuration file you can specify one or more headers which if detected by Ayllu will cause it to serve content from the directory rather then it's web interface.

Below we specify that any request sent to Ayllu with header Host = example.org should return HTML content from within the repository directory www/public.

[ayllu-sites]
  enabled = true
  header = Host=example.org
  content = www/public

Proxy configuration

Typically you would want a proxy server in front of your Ayllu instance. You can then pass any headers to your downstream instance and it should serve the content as expected.

Example Nginx Proxy

...
 location / {
     include config.d/proxy.conf;
     proxy_pass http://127.0.0.1:8080;
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }