L33 - Server Hosting
L33 - Server Hosting
COS216
AVINASH SINGH
DEPARTMENT OF COMPUTER SCIENCE
UNIVERSITY OF PRETORIA
Overview
Webserver
Server Options
Server Options
Not the best option for websites with thousands or millions of concurrent users
Access can become slow if many users access all the different websites on the shared
server
Use for small websites where reliability/speed is not that important
Typically does not allow to install any packages/programs on the OS
Since different users share the same server, you do not want to give users root access
With root access things can be installed/removed and can cause the server to go down for
all users/websites
Shared Hosting
Server Options
Server Options
Domain parking
Purchase a domain for very cheap
Once someone wants the specific website, sell it for a profit
Parked domains are sold for a few hundred to a few million dollars
Common practice in the dot-com bubble, but still done today
Domains
Njilla (njil.la)
Domain registration service
Created by the ThePirateBay founders
Provides anonymous domain registration
Njilla purchases the domain on your behalf
Their name instead of yours is listed under whois
They try to combat constant domain suspensions
You can create an anonymous account with them
You can make anonymous payments to them (cryptocurrencies)
Even when they receive requests to hand out customer info, they don’t have any info, and if
they have it they do everything legally to avoid handing out info
Security Certificates
Webserver Software
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected] Provide the
ServerName satoshicave.com
ServerAlias www.satoshicave.com administrator’s
DocumentRoot /var/www/satoshicave.com/public/ email address
</VirtualHost>
Apache
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName satoshicave.com Provide the
ServerAlias www.satoshicave.com
DocumentRoot /var/www/satoshicave.com/public/
website‘s default
</VirtualHost> domain
Apache
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName satoshicave.com
ServerAlias www.satoshicave.com Provide the
DocumentRoot /var/www/satoshicave.com/public/ website‘s aliases,
</VirtualHost>
such as subdomains
Apache
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName satoshicave.com
ServerAlias www.satoshicave.com
DocumentRoot /var/www/satoshicave.com/public/
</VirtualHost> Provide the
directory that
contains the website’s
files
Apache
<VirtualHost *:443>
ErrorLog /var/www/satoshicave.com/log/error.log
CustomLog /var/www/satoshicave.com/log/access.log combined
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /var/www/satoshicave.com/ssl/satoshicave.crt
SSLCertificateKeyFile /var/www/satoshicave.com/ssl/satoshicave.key
SSLCACertificateFile /var/www/satoshicave.com/ssl/satoshicave.cer
</VirtualHost>
<VirtualHost *:443>
ErrorDocument 400 /error/400.php
ErrorDocument 404 /error/404.php
ErrorDocument 500 /error/500.php
</VirtualHost>
If you purchase a new server, it is very likely that outgoing emails are flagged as spam
By spam filters, such as SpamHaus
Or email providers, such as Gmail, Outlook, or Yahoo Mail
You have to build up a reputation over years in order not to be flagged as spam
anymore
Various things can be done to improve your reputation
Use SSL certificates
Adding a SPF entry to your DNS and using reverse DNS (RDNS)
Registering your server with providers such as SpamHaus or Microsoft
Tools
Similar to Webmin
Free and open-source
Provides less config functionality than Webmin, but has more advanced monitoring
features
Plus a very nice interface and additional plugins
Tools - LIBRENMS
Tools - Piwik
Server Statistics
Track OS statistics, such as CPU and RAM utilization, disk usage, MySQL usage, network
usage, entry processes, etc
Web Analytics
View advanced details of website users and requests, such as users’ countries, devices, and
OSs, bandwidth usage, visited sites, etc
Vie PHP errors and raw access logs
File Management
Manage FTP accounts and restrictions
Upload files directly through cPanel if you don’t want to use FTP
Tools - CPanel
Email Management
Manage email accounts, setup forwarding address, automatics reposes, etc
Access webmail through a webinterface (eg RoundCube, SquirrelMail)
Database Management
Manage databases and user access to those database
Use phpMyAdmin for full control and SQL queries on the databases
Domain Management
Manage domains and add/remove subdomains
Edit DNS entries and add redirections
Tools - CPanel
Security Management
Various security mechanisms such as blocking certain IPs from accessing your site
Allows to add SSL certificates to your site
Many hosters have Let’s Encrypt directly integrated into cPanel, so you can install a free SSL
certificate for your site with a single button click
Preference Management
Manage various parts of your webserver
Edit Apache configurations
Select a PHP version and configure PHP, such as setting the maximum RAM per script
execution, setting the maximum upload file size, setting the maximum execution time per
script, and much more
Tools - CPanel
Software Management
Install additional plugins to add more features to cPanel
Add complete packages such as WordPress, Joomla, and content management systems
Add extensions and libraries, such as Perl and PHP extensions
Typically limited by shared hosters, the more you pay, the more packages/extensions can
be installed
If you have a VPS or dedicated server and install cPanel yourself, you will obviously have
access to all packages supported by your system
DNS