Introduction
This page is aimed at anyone who wants to use bytemark-vhost to administer their server, but isn't a fan of command-line interfaces.
In this example, we'll be using FileZilla - an open-source graphical FTP client that's available on Windows, Linux and Mac OS - to set up a website and associated mailboxes on a Bytemark virtual machine. Of course, you can use any secure FTP (sftp)-capable client and platform you like - these spirit of these instructions remains the same.
Setup
Firstly, you need to install and run FileZilla - this is left as an exercise to the reader. Once it's running, you are given the following window:
Now you need to log onto your server, as show in Figure 2. You want to give FileZilla the address (IP or domain name) of your server (preceded by sftp:// to indicate the protocol to use) the bytemark-vhost user ('admin') and the password (typically the same as the root user's password). Then hit "Quickconnect".
The first time to attempt to login to your server, your local machine won't have details of its SSH key, so you'll get a dialogue box as shown in Figure 3. Click the "Always trust this host" checkbox and press OK to accept and store your server's RSA certificate.
FileZilla will then login to your server and navigate to the /srv directory - this is the admin user's default home directory, and the place where most of bytemark-vhost's configuration takes place. Your local machine is shown in the left pane, and the remote machine is shown on the right pane.
Creating a website
Making a new website is extremely simple. You just create a directory in /srv with a name identical to the domain name, then create a subdirectory "public/htdocs" within that.
For example, I want my website to be hosted as "vh-test.lupine.me.uk", so I right-click on the "/srv" directory and select "Create Directory". Then I enter the domain name in the subsequent dialogue box, and hit "OK". I repeat the process twice, right-clicking on the newly-created directory and entering the new name each time.
This leaves me with the following directory structure:
- /
- srv
- vh-test.lupine.me.uk
- public
- htdocs
- mailboxes
- bob
- public
- vh-test.lupine.me.uk
- srv
Note that /srv/vh-test.lupine.me.uk/public/htdocs corresponds to http://vh-test.lupine.me.uk/ - and if I navigate to that, I'm treated to the following view, showing that Apache is serving the website correctly.
Of course, there isn't anything for Apache to serve just yet, which is why it's showing the default "placeholder" page. Getting it to serve the website you've produced from your own blood, sweat and tears is a simple matter of copying it over from your local machine to the public/htdocs directory. You can drag 'n drop, or right-click on the files and directories you want in the left pane and select "Upload". In my case, I have a rather simple index.html, so I copy that over...
And my website works!
Setting up e-mail
Emails are even easier. Say I want to be able to send emails to "bob@…"... I just have to create a new directory in /srv/vh-test.lupine.me.uk called "mailboxes/bob" - as detailed earlier. That looks like:
- /
- srv
- vh-test.lupine.me.uk
- public
- htdocs
- mailboxes
- bob
- public
- vh-test.lupine.me.uk
- srv
Then I need to give the mailbox a password - this is done by placing a file called "password" in the same directory, containing the plain-text password I want the user to have. As it's plaintext, you need to be fairly careful of the permissions... so first create the file on the local machine and upload it, as detailed earlier.
Next, right-click on the file and select "File Attributes", then set the permissions to 640 - this prevents anyone except the admin user, or people in the admin group, from viewing the password.
That's it! - I can now send (authenticated SMTP) or receive (IMAP, POP3) emails using that account. Better yet, webmail is automatically set up and working at http://vh-test.lupine.me.uk/webmail
For fifteen minutes of work, that's a pretty complete set-up! To find out how to do more, see the remaining pages on this wiki. Thanks for reading :)
Attachments
- started-up.png (36.6 kB) - added by lupine 5 months ago.
- logon1.png (38.6 kB) - added by lupine 5 months ago.
- logon2.png (62.0 kB) - added by lupine 5 months ago.
- logon2-dialogue.png (15.9 kB) - added by lupine 5 months ago.
- logged-on.png (44.1 kB) - added by lupine 5 months ago.
- create-dir1.png (3.8 kB) - added by lupine 5 months ago.
- create-dir2.png (8.9 kB) - added by lupine 5 months ago.
- dir-tree1.png (57.5 kB) - added by lupine 5 months ago.
- site1.png (55.6 kB) - added by lupine 5 months ago.
- upload1.png (3.9 kB) - added by lupine 5 months ago.
- upload2.png (60.1 kB) - added by lupine 5 months ago.
- site2.png (29.5 kB) - added by lupine 5 months ago.
- dir-tree2.png (55.5 kB) - added by lupine 5 months ago.
- email1.png (58.1 kB) - added by lupine 5 months ago.
- email2.png (4.2 kB) - added by lupine 5 months ago.
- email3.png (17.5 kB) - added by lupine 5 months ago.
- email4.png (62.3 kB) - added by lupine 5 months ago.
















