2. Create /etc/httpd/conf.d/oe.conf (same name as the folder contain Open Enventory, in this case /var/www/html/oe)
In Terminal, type:
Add the content below:
All of these below info (highlighted in red can be change to match specific ip address as well as document location:
ServerName your_url.net
DocumentRoot /var/www/html/oe
Redirect permanent / https://romo.ddns.net/
2. Restart apache service, in Terminal:
SETTING UP CRONTAB TO AUTOMATICALLY BACKUP YOUR DATABASE
This is optional but recommend for auto back up the OE database as well as the user’s info and password
This specifically apply to: CentOS 7 (Apache version: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.5.25
PHP version: 5.5.25
MySQL server version: 5.5.41-MariaDB)
Go into Terminal in your server and log in as root user (type: “su” and then password at the command line
Note: you can do the rest of the command lines below with prefix “sudo your-command-here” if you don’t want to log in as root
3. At the command line, type:
4. When the file is open, insert the following. Note: everything is red can be changed to match specific details. -$(date +\%Y\%m\%d): is used to set automatic date
Specifically, ssh into the server and then log in as root user
Use following command:
change “-20” to “-xx” with “xx” is the number of result. This is sort from most to least access request
4. Google any ip lookup website and check these IPs(e.g: https://whatismyipaddress.com/ip-lookup). If find any suspicious ones, you can add a rule to block those ip network address by the next step
Specifically using this command (after ssh into the server and then log in as root)
To list the IP sets known to firewalld in the permanent environment, use the following command as root:
3. To get more information about the IP set, use the following command as root: (in the example below, “test” is the name of ipsets you got from the above command
Or:
To see the extended entries list of the IP set, use the following command as root:
#This is to back up the Romo's OE database into home/khoi/OEbackup, every day at 00:05 am
5 0 * * * mysqldump -u root –pyour-password romo > /home/khoi/OEbackup/romo-backup-`date +"%Y%m%d"`.sql
#This is to back up the user table in mysql in order to save users' password, every day at 00:10 am
10 0 * * * mysqldump -u root -pyour-password mysql user > /home/khoi/OEbackup/romo-backup-user`date +"%Y%m%d"`.sql
#This is to copy the back up file to External harddrive, every day at 00:15 am
15 0 * * * sshpass -p your-password rsync -ave ssh --ignore-existing /home/khoi/OEbackup/ daniel@romomacpro.ddns.net:/Users/daniel/Documents/OEbackup/
#This is to delete the file every month
0 0 * * */4 rm -r /home/khoi/OEbackup/romo-backup-*.sql