Resources for Setting Up New Server
Last updated
Was this helpful?
Last updated
Was this helpful?
and are two fantastic VPS hosting.
A2 hosting was chosen because of:
To make a script to delete files older than X days when there is less than XGB left, see this:
Rclone is used to automatically backup file toGoogle Drive account:
To back up the whole VPS, follow this:
Modified script as this:
danielromogroup.com and other sites on this server has been set up using /etc/httpd/conf.d/site.com.conf
To test your SSL for your site:
To strengthen your SSL connection:
Info:
HSTS Strict-Transport-Security:
OCSP Stapling: help with all SSL security connection a little faster:
We need to modify the httpd.conf
file:
In this file: after <Directory "/var/www/html">
, modify AllowOverride None
to AllowOverride Options
.
Save the file (hit Esc, type :wq
and then Enter)
Restart httpd service:
Creating Template:
DON’T FORGET TO OPEN PORT 7822 FOR SSH WHILE USING A2 SERVER
On current A2 hosting, the server config can be found in /etc/httpd/conf/httpd.conf
For CentOS, generate two #.conf files in /etc/httpd/conf.d/. For example: /etc/httpd/conf.d/site1.com.conf and /etc/httpd/conf.d/site2.com.conf. Each conf file is the apache set up for the site. Example of the content of site2.com.conf:
UpdraftPlus Plugin is used to back up WordPress. To restore Wordpress
Create a fresh install of wordpress as in the link above
Install Updraftplus plugin
Load the backup files
Restore
To use 1-click update on Wordpress, you need
Wordpress folder (in this case /var/www/html/baylorcpritlab.com) to be owned by apache:apache with 755 permission
To secure Wordpress, all folders inside the baylorcpritlab.com should have 755 persmission and all files should have 644 permission
Note: when change the info in the config.php file, make sure to change the:
Install password
User: to ‘root’
Password to ‘root_passowrd’
SSH set up:
SSH using keys:
Possible error while setting up ssh key:
Disable SSH login for root (recommended):
FTP:
SCP:
To monitor uptime for the server, use:
Install:
Configuration for Google Drive: or
Usage:
For Rclone filtering:
This is more options:
First: Make sure you have the your_site.com.conf file inside /etc/httpd/conf.d. Following the following website: ; For more elaborate see:
Optional, here is another way the step above can be set up (Note: this website set up a bit different than the one above, specifically, the above website use /etc/httpd/conf.d/ instead of /etc/httpd/sites-enabled):
This is a good installation for Certbot Let’sEncrypt (ignore the multiple certificate setting):
Using Certbot (Intro):
Doc:
Rate limit for Let’sEncrypt:
To read more about SSL:
Remove SSLv3 SSLv2:
Assinging password and require immediate pass change after log in:
Add Linux users to a group:
If forgot to open port 7822, follow this link:
Error that need to change packet size:
Setting up multiple Let’sEncrypt certificates for multiple hosts on the same server: (this is for Ubuntu)
After that use “/usr/local/sbin/certbot --apache -d example.com -d ” . The content of site2.com.conf file will be automatically changed. Here is example of the content of site2.com.conf after running the “certbot-auto…”
Read here for more info about a set up a conf file for SSL certificate:
Initial Install:
From A2:
WP security, from A2 hosting:
If there is issue after restore, check here first. A common issue is the rewrite link issue (Wordpress Permanet link), follow the solution in “Using ‘Pretty’ permalinks” in this link:
Optimizing WP, from A2 hosting: ;
Multiple sites (using WordPress) installation:
Moving Wordpress site(s):
Uninstall Wordpress:
Wordpress login trouble:
See here for official guide:
Also see: