How Web Hosting Works on Sympl
Web hosting with Sympl works somewhat automatically, creating Apache configurations and using a combination of Apache modules and redirects to serve content from the relevant directory even without a configuration, and send any unexpected traffic to the default domain.
The flow for Apache looks like this:
- If there is a matching configuration existing, that configuration is used.
- If mass hosting is not enabled, the first site found by Apache in the configuration will be served.
- If mass hosting is enabled, the vhost_alias module will look for an exact match for
/srv/http_hostname/public/htdocs/
. If it exists, it will serve the content from that directory. - If there is no match, it will check for
/srv/www.http_hostname/public/htdocs/
, and serve content from that directory if it exists. - If there is no match at all, it will serve the content from
/srv/server_hostname/public/htdocs/
.
Note that the mass-hosting configuration lacks some protections afforded by regular sites, such as the PHP security features in Sympl. The next time that sympl-web-configure
is run (which happens hourly by default), an individual configuration for each site will be created automatically, with the PHP security features enabled.
Note that this is a little different to how Symbiosis worked, as at step 3 it would look for matches and remove elements from the start of the domain until it found a loose match, whereas Sympl only matches against example.com
and www.example.com
. Similarly, Symbiosis would only create a configuration for each site if it had either a specific IP set, or had SSL certificates for the domain.