Edit php.ini
file (/Applications/XAMPP/xamppfiles/etc/php.ini if you use XAMPP in MacOS)
Change:
to:
2. Restart server
This is optional but recommend for any site that requires user login
This specifically apply to:
CentOS 7
Follow the instruction in this website to install and enable ssl: http://wiki.centos.org/HowTos/Https#head-35299da4f7078eeba5f5f62b0222acc8c5f2db5f
Ignore Step 3 in the tutorial above
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:
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)
Set up sshpass to automatically pass the password. Note: this is not ultrasafe but it is simple. Check out this link: http://www.server-world.info/en/note?os=CentOS_7&p=ssh&f=7 (only need to follow how to install, step 1)
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
5. More example of crontab can be read here:
This guide to use access_log to find out some high frequent access ip and then check them manually and form a block ip if necessary
Follow this: https://stackoverflow.com/questions/18682308/sort-uniq-ip-address-in-from-apache-log , first answer
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
Follow this guide: https://www.getpagespeed.com/server-setup/security/centos-7-ban-bad-ips-and-networks-with-firewalld
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:
Follow this guide:
See these references:
See the following resources:
Good and comprehensive: http://www.vanemery.com/Linux/ACL/linux-acl.html#default
Simple preservation of parent folder group owernship for all files newly created: https://serverfault.com/a/361666