SSD cloud hosting for cheap

for 10USD (500PHP) a month. You get a high performance VPS which can run several sites for cheap, the only catch is you have to set it up and maintain it yourself. Here’s what I did to get mine up and running in a couple of minutes:

I started by creating an Ubuntu 16.04 LTS node,
then secured my server with their Securing Your Server guide. I also created another user group to make uploading files later easier, then add the non-root user to that group:

1

2

3

sudo adduser<username>www-data

sudo chgrp-Rwww-data/var/www;sudo chmod-Rg+rw/var/www

sudo find/var/www-typed-print0|sudo xargs-0chmodg+s

I installed Apache next with their guide: Hosting a Website. I then change some settings in my Apache config but adding some mods I use like mod_rewrite:

1

sudo a2enmod rewrite

I then install mySQL and lock it down using the following commands, which are also found in the Linode Guide:

1

2

sudo apt-get install mysql-server

sudo mysql_secure_installation

The I optimize my my.cnf for my puny 2GB server (/etc/mysql/my.cnf):

1

2

3

4

5

6

7

8

[mysqld]

max_allowed_packet=1M

thread_stack=128K

max_connections=75

table_open_cache=32M

key_buffer_size=32

Ubuntu 16.04 LTS does not have support for PHP5 anymore so I used PHP7, so I installed that with the following commands:

1

sudo apt-get-yinstall php7.0libapache2-mod-php7.0

then I install some extensions I need like mySQL, curl etc. THe first commands list the available PHP extensions, then second installs the ones I use.

1

2

3

4

5

6

sudo apt-cache search php7.0

sudo apt-get-yinstall php7.0-mysql php7.0-curl php7.0-gd php7.0-intl

php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache

php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc

php7.0-xsl php7.0-mbstring php-gettext

We’ll need to install postfix also so PHP’s mail() function will work.

1

2

sudo

apt-get install postfix

Be sure to set “Internet Site: in the configuration dialog. The sendmail_path should be pre-configured correctly already, if not simply set it to:
/usr/sbin/sendmail -t -i

I now Install my FTP server, I use FileZilla since I use the client on my machine natively, then simply connect via SSH/SFTP

1

sudo apt-get install filezilla

Once that is done, I simply point my domains to my server IP. Linode offers a DNS Manager but I prefer to use GoDaddy’s for simplicity. Hen the IP resolves, I test all my settings then I am off!

UPDATE:

When adding new sites or downloading scripts via wget you’ll need to set permissions again to be able to modify them via FTP:

1

2

3

sudo chgrp www-data/var/www/html

sudo chmod-R775/var/www/html

sudo chmod-Rg+s/var/www/html

Alternatively you can make sure we have the right permissions for the web root