Tuning the Linux kernel for better network throughput

add these lines to /etc/sysctl.conf :

fs.file-max = 100000
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_syncookies = 1
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.rmem_default=65536
net.core.wmem_default=65536
net.ipv4.route.flush=1

and then :

sysctl -p /etc/sysctl.conf

References
http://www.techrepublic.com/blog/linux-and-open-source/tuning-the-linux-kernel-for-more-aggressive-network-throughput/
https://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Web_Platform/5/html/Administration_And_Configuration_Guide/jgroups-perf-udpbuffer.html
http://www.nateware.com/linux-network-tuning-for-2013.html
http://www.slashroot.in/linux-network-tcp-performance-tuning-sysctl

Enable linux swap partition

You have no configuration for swap in /etc/fstab . Add following line to that file:

UUID=<uuid> none   swap    sw    0       0   

You have to replace with the uuid of your swap partition. To do that, run sudo blkid

$ sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="88A0D0A1A0D09752" TYPE="ntfs" 
/dev/sda2: UUID="0620D9F920D9EFA3" TYPE="ntfs" 
/dev/sda5: UUID="c282b418-2045-4852-8789-88a44360a0bb" TYPE="ext4" 
/dev/sda6: UUID="f99c6a0c-790a-45ca-a1a9-8874f5a2999b" TYPE="ext4" 
/dev/sda7: UUID="4cc2e909-ebd1-4c72-abee-aa32035bf330" TYPE="swap"

References
http://askubuntu.com/questions/194775/swap-not-available-i-must-manually-swapon-after-every-reboot

Configure Let’s Encrypt for Apache on Ubuntu

sudo apt-get install python-letsencrypt-apache 
letsencrypt --apache
nano /etc/apache2/apache2.conf
<VirtualHost *:443>
	SSLEngine on
	SSLCertificateKeyFile /etc/letsencrypt/live/dl.mhdr.ir/privkey.pem
	SSLCertificateFile /etc/letsencrypt/live/dl.mhdr.ir/cert.pem
	SSLCertificateChainFile /etc/letsencrypt/live/dl.mhdr.ir/chain.pem
    DocumentRoot "/var/www/html/dl"
    ServerName dl.mhdr.ir
</VirtualHost>
service apache2 restart

PPA

$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-apache

note : only the last VitualHost will be detected by letsencrypt
References
https://certbot.eff.org/#ubuntuxenial-apache
https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
https://letsencrypt.org/