Setting up a website

Before starting this section
1. Connect to your server over SFTP using FileZilla (see Connecting to your server)

Start up your web browser and enter the server’s name in the location bar, e.g., http://example.default.bytemark.uk0.bigv.io.

There is no default web page. You’ll see a 404 error when you try to access the web site, until you create a page.

You can do this by uploading a simple index.html file to the directory /srv/example.default.bytemark.uk0.bigv.io/public/htdocs/ For example, as follows:

  1. Create a simple HTML file named index.html. It has been assumed that it has been saved in the directory called My Documents/.

  2. Start up FileZilla and connect to your server.

    The file index.html should show up in the lower left-hand pane. In the right-hand pane the /srv/ directory will be shown.

  3. HTML files should be uploaded to the public/htdocs/ directory. This can be found by revealing the contents of srv/ by clicking the + to its left in the top-right hand pane. public/htdocs/

  4. Now right-click on index.html in the lower left-hand pane, and select Upload from the menu. The file is uploaded to the htdocs/ directory on the server.

  5. Refresh your web browser to see the result.

Note
This example shows uploading a web page written in HTML, called index.html. This file could also be written in PHP, in which case the file should be called index.php.

Hosting a web page using your own domain

The previous section dealt with setting up a web page using the default domain associated with the server. A Symbiosis system can host many domains without any extra configuration. This section deals with configuring a second domain.

It has been assumed both that your server is hosted at Bytemark, and that this second domain is using the Bytemark name servers.

For the purposes of this tutorial, the domain my-brilliant-site.com is being hosted on the server example.vm.bytemark.co.uk.

  1. With FileZilla connected to the server, make sure the Remote site text field is pointed at the /srv/ directory a. Right click on the folder icon b.

  2. From the right-click menu select Create directory and in the Create directory pop-up enter /srv/my-brilliant-site.com.

  3. Click the OK button c to create the directory

  4. Repeat this step to complete the domain tree with the directories /srv/my-brilliant-site.com/public/ and /srv/my-brilliant-site.com/public/htdocs/.

  5. Create another index.html file.

  6. Upload it as before, but this time into the htdocs/ directory in the my-brilliant-site.com/ directory tree.

Within a hour, the DNS records for my-brilliant-site.com will be generated and uploaded to the Bytemark domain name servers. Navigating to that site will then show our new index page.

At this point, the site will also be visible at both http://my-brilliant-site.com and http://www.my-brilliant-site.com. This is part of the Symbiosis set-up; if different pages were required at www.my-brilliant-site.com, a separate directory tree should be created for www.my-brilliant-site.com, with a different content as needed.

Handling wildcard domains

As previously noted if there is a directory present upon the server with the name /srv/my-brilliant-site.com/public/htdocs/ the contents of that directory will be served for that domain, as well as any subdomains of that domain, for example:

By default, Symbiosis will create DNS records for only the raw domain and the www subdomain. To use anything other than these, you will need to create further DNS records for either the specific subdomains you wish to serve, or a Wildcard DNS record to match anything else. Please see the reference manual for more information on how to do this.

If you wish to mandate a particular hostname for your sites that can be arranged via mod_rewrite, which is also discussed in the reference manual.

Testing a new domain

It is possible to test the content associated with a new domain before it has been registered or had any DNS configuration done. This is done using the testing prefix.

If your server is not hosted at Bytemark, or your server name does not end in bytemark.co.uk then a wild-card DNS record is needed for this to work.

For example, to view the site my-brilliant-site.com which is hosted on the server example.vm.bytemark.co.uk, simply head to http://my-brilliant-site.com.testing.example.vm.bytemark.co.uk/.

This testing URL is immediately available following the upload of the index.html or index.php files.

Note that there is no www at the start of the testing URL.

Note
This facility does not play well with certain directives that can be used in Apache htaccess files, especially rewrite rules.

Configuring SSL Hosting

By default, Symbiosis will try to use certificates from LetsEncrypt to secure your site. These certificates are free at the point of use and issued automatically. They are trusted by all modern browsers, and largely obviate the need to acquire certificates from commercial providers.

As a result no action is needed to configure SSL hosting for your sites as it will happen for you automatically. SSL Configuration gives more details on exactly how the mechanism works, and is worth reading if you wish to replace the LetsEncrypt certificates with some issued by a third party provider.

Note
Extra IP addresses are no longer needed to host multiple SSL-enabled sites on one server. Server Name Indication (SNI) is supported by all modern browsers, allowing multiple SSL sites on one IP. If you wish to use multiple IPs, then they can can be allocated in the normal way.

Making SSL mandatory

If you prefer to ensure that each visitor to your website uses the SSL-protected site you can make it mandatory by creating an empty file called config/ssl-only. This should cause the site to be reconfigured to redirect all traffic to the SSL-secured site. When this setting is applied, the HSTS header is automatically sent.

You are currently viewing Symbiosis user documentation. Symbiosis also has a comprehensive technical reference manual.

Bytemark Cloud used to be called "BigV"—nothing has changed except the name! We’re hiring! Please visit careers.bytemark.co.uk to find out more.