[Essay] Help me improve my article! Thanks

Status
Not open for further replies.

Harry Tang

Member
Joined
Jan 27, 2017
Member Type
Student or Learner
Native Language
Vietnamese
Home Country
Vietnam
Current Location
Vietnam
Title: DirectAdmin: Improve performance and security
------------------------------------------------------------
[FONT=&quot]In this tutorial, I'm going to improve the DirectAdmin environment, make it faster and more secure. I assume that you have installed DirectAdmin on your server (for this guide, I use CentOS 7 64bit). A good understanding of Linux basics is needed to follow this guide. Now we begin:[/FONT]
[h=2]Use Nginx reverse proxy[/h][FONT=&quot]Performance can be improved by the reverse proxy handling static content and from application requests. If your web server is not set to this mode, follow the commands below:[/FONT]
[removed][h=2]Enable HTTP/2[/h][FONT=&quot]HTTP/2 is the latest update to the HTTP protocol with many advancements in efficiency, security and speed. Simply run the commands below to enable HTTP/2:[/FONT]
[removed][FONT=&quot]Then we edit the configure file:
[/FONT]

[removed][FONT=&quot]And add 2 lines:
[/FONT]

[removed][FONT=&quot]
30374904536_054b05282b_o.png
[/FONT]

[FONT=&quot]Next, we update the nginx-vhosts:
[/FONT]

[removed][FONT=&quot]Add http2 to all SSL listen like this:
30111818580_c8439710a6_o.png
[/FONT]

[FONT=&quot]Finally, build and restart the service:
[/FONT]

[removed][h=2]Use PHP 7[/h][FONT=&quot]Up to 2x faster performance and 50% better memory consumption than PHP 5.6.
[/FONT]

[removed][FONT=&quot]If you have CloudLinux:
[/FONT]

[removed][FONT=&quot]If you don't have CloudLinux:
[/FONT]

[removed][FONT=&quot]Then build php:
[/FONT]

[removed][FONT=&quot]Edit php.ini and double those settings: memory_limit, max_execution_time, max_input_time[/FONT]
[h=2]Enable OpCache[/h][FONT=&quot]OpCache can improves PHP performance as well, run the following commands:
[/FONT]

[removed][h=2]Use MariaDB[/h][FONT=&quot]A lot of optimizer enhancements in MariaDB, if your server is not set to use MariaDB, follow this:
[/FONT]

[removed][FONT=&quot]Increase max allowed packet:
[/FONT]

[removed][FONT=&quot]Set max_allowed_packet = 50M , innodb_log_file_size = 100M and bind-address = 127.0.0.1 in [mysqld] section.[/FONT]
[h=2]Enable SSL for all services[/h][FONT=&quot]Assume that your server hostname is server.domain.com. We use "Let's Encrypt" tool to setup SSL for server hostname and all services, now edit the directadmin.conf file:
[/FONT]

[removed][FONT=&quot]set enable_ssl_sni=1
set ssl_redirect_host=server.domain.com
set force_hostname=server.domain.com
set carootcert=/usr/local/directadmin/conf/carootcert.pem
set letsencrypt=1[/FONT]

[FONT=&quot]Next run the following commands:
[/FONT]

[removed][FONT=&quot]Now set SSL=1 in directadmin.conf and restart directadmin service again.[/FONT]
[FONT=&quot]Next, update Roundcube config for SSL connection:
[/FONT]

[removed][FONT=&quot]set $config['password_directadmin_host'] = 'ssl://localhost';[/FONT]
[FONT=&quot]Testing SSL by running the following commands, one by one:
[/FONT]

[removed][FONT=&quot]Make sure you can see the Certificate in the result like this:
29773425303_9c615687b7_o.png
[/FONT]

[FONT=&quot][FONT=&quot]Use hostname for alias
[/FONT][/FONT]

[removed][h=2]Enable DKIM[/h][FONT=&quot]Enable this feature will help you keep emails sending from your server out of the Spam folder, download the dkim.conf file:
[/FONT]

[removed][FONT=&quot]Edit your /etc/exim.conf, and find the code:
[/FONT]

[removed][FONT=&quot]Then change it to look like:
[/FONT]

[removed][FONT=&quot]If you don't want to see the hostname in user's emails "on behalf of":
[/FONT]

[removed][FONT=&quot]Then restart exim:
[/FONT]

[removed][FONT=&quot]Finally, update directadmin.conf file:
[/FONT]

[removed][FONT=&quot]set dkim=1 dns_spf=1 hide_outlook=1 and then restart DirectAdmin[/FONT]
[FONT=&quot]Now we can create DKIM for the server hostname:
[/FONT]

[removed][FONT=&quot]Now go to DirectAdmin > DNS Administration and click on your server hostname to check and DKIM key, and update your SPF record (for IPv6).[/FONT]
[h=2]Enable IP Blocking[/h][FONT=&quot]We will use BFM and CSF:
[/FONT]

[removed][FONT=&quot]Download config fires:
[/FONT]

[removed][FONT=&quot]Create the empty block list and exempt list files:
[/FONT]

[removed][FONT=&quot]Open ports 465, 2525, 35000:35999 in CSF:
[/FONT]

[removed][FONT=&quot]Enable and start the firewall. Edit /etc/csf/csf.conf:
[/FONT]

[removed][FONT=&quot]Update Settings in Directadmin like below:
31951342465_522dff1397_o.jpg
[/FONT]

[FONT=&quot]Now you have an excellent hosting server! If you need any help please let me know.[/FONT]
 

emsr2d2

Moderator
Staff member
Joined
Jul 28, 2009
Member Type
English Teacher
Native Language
British English
Home Country
UK
Current Location
UK
Welcome to the forum. :hi:

You are going to need someone who is completely familiar with all the terminology/jargon to help you with this. There's hardly anything that can be deemed a standard English sentence so it's rather hard (for most of us) to check it for errors. The only thing that I've spotted is that you need a comma after "help" in the very last sentence!
 
Status
Not open for further replies.
Top