In a previous article, I looked at what you’ll need to get to grips with if you decide to treat yourself to a dedicated server.
We saw how you create an account for yourself in the Plesk web-based admin system, then add a domain, which configures the web server to serve up pages.
We got as far as setting up the site and a few of the options necessary to upload pages.
In this article I’ll explain what you need to do next if you’re running a site that requires things like a database to be configured, plus some of the other tasks you may need to think about.
Uploading your site
At the end of the last instalment, we configured the hosting with an FTP user
for uploading the files to the site. Depending on the configuration of your
system, you may need to check exactly where your web files have to be uploaded.
For example, with the Plesk system on the server we used, when you connect via FTP, you’ll see a home directory containing several folders; the one into which your main web pages should be put is called httpdocs; there’s also ‘httpsdocs’, which is for the files that would be served over a secure connection. If you’ve created subdomains of your site, those are in a different place.
Say you’ve added ‘forum.yourdomain.com’, from the home directory you’ll need to go to subdomains/forum/httpdocs to upload web pages for that. Different web admin systems will arrange things in different ways; for example, on our older Cobalt Raq servers, you’d need to change to /web after logging in via FTP for the main site.
I’d also recommend checking to see if you can use SFTP rather than FTP – this uses secure connections, and if it does work, consider turning off or blocking FTP on your server completely. It’s a magnet for people trying to attack the system, thanks to flaws in some old FTP server software.
Similarly, if there’s an option for Telnet access to the server – which lets you type commands at the Linux prompt – it’s preferable to use SSH, so turn that on. But please, if you don’t need ‘shell access’ as this is called, you really should make sure that it’s turned off for most users. It is handy, however, for an admin user to be able to connect to the server via SSH, as it can be a useful troubleshooting tool.
Database setup
For many sites, one of the reasons for using your own server rather than the
free space that came with your internet access is to allow you to do more
creative and interesting things with dynamic sites and scripts, and that often
means setting up a database server.
Most content management systems (CMS) rely on a database, as do forums, blogs and plenty of other useful tools. Over the years, we’ve looked in a fair bit of detail at how you can write the scripts you need, but before you can get that far, you need to configure the database server.
If you’ve set up the website from scratch, it’s unlikely it will have been done for you – though some friendly web hosts will have. So, let’s walk through the steps you’ll need to do to get a basic database ready for your web scripts.
As with last month, the admin system in the web pages will be Plesk, on a server from 1 and 1; this comes with the popular MySQL database and a set of web admin pages for it. On the Plesk main screen, click Server in the left-hand panel, and then choose Database Servers; if a server is already running on the system, you’ll see something similar to the screenshot at the top of this page.