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):
danielromogroup.com and other sites on this server has been set up using /etc/httpd/conf.d/
8. Setting up owner of /var/www/html folders, to easy update website:
9. Creating groups, users; Assigning passwords:
Assinging password and require immediate pass change after log in:
Add Linux users to a group:
10. Force using https access using .htaccess:
11. Configure PHP to read .htaccess file on a CentOS 7 server
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:
12. Dreamweaver:
Creating Template:
13. Setting up firewall for CentOS 7:
DON’T FORGET TO OPEN PORT 7822 FOR SSH WHILE USING A2 SERVER
If forgot to open port 7822, follow this link:
14. MySQL/MariaDB
Error that need to change packet size:
15. Installing phpMyAdmin
16. Working with tar files
17. Setting up multiple websites with multiple domains on the same server
On current A2 hosting, the server config can be found in /etc/httpd/conf/httpd.conf
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:
18. Working with WordPress
Initial Install:
From A2:
WP security, from A2 hosting:
19. Setting up Booked Scheduler
See here for official guide:
Note: when change the info in the config.php file, make sure to change the:
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
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: