# Server customization
The Upgrade script overrides all the modifications that were made in server configurations, but there are several ways to make customization properly.
# Custom PHP configuration
Create a new file in /etc/php/php-fpm.d/
directory with .ini
extension.
# Example
echo "upload_max_filesize = 400M \n post_max_size = 400M" > /etc/php/php-fpm.d/60-increase-memory-limit.ini
# Custom PHP-FPM configuration
Create new files in /etc/php/php-fpm.d/
with .conf
extension. For example, /etc/php/php-fpm.d/custom.conf
.
# Custom Nginx config
The list of available configuration files.
/etc/nginx/conf.d/local/keitaro/admin.inc
. Use that file to insert customization underlocation /admin {}
section./etc/nginx/conf.d/local/keitaro/nontracker.inc
. Use that file to insert customization for landing pages./etc/nginx/conf.d/local/keitaro/realip.inc
. Use that file to customize realip resolutions./etc/nginx/conf.d/local/keitaro/server.inc
. Use that file to customizeserver {}
section./etc/nginx/conf.d/local/keitaro/tracker.inc
. Use that file to insert customization of traffic handing.
Validate configuration:
nginx -t
Restart nginx:
systemctl restart nginx
How to restrict access to Admin Dashboard by IP?
To block all IPs, except for 1.2.3.4 to access to the Admin Dashboard, run:
echo 'allow 1.2.3.4; deny all;' > /etc/nginx/conf.d/local/keitaro/admin.inc
How to block specific IP?
echo 'deny 1.2.3.4; allow all;' > /etc/nginx/conf.d/local/keitaro/server.inc
# Custom MariaDB (MySQL) configuration
Create a new file in /etc/my.cnf.d/
directory with .cnf
extension. For example, with /etc/my.cnf.d/x-overrides.cnf
.
Restart MariaDB:
systemctl restart mysql
# Firewall
To open a port, run:
firewall-cmd --add-port=port_number/tcp
Save the firewall configuration with the following command:
firewall-cmd --runtime-to-permanent
For example, to open port 8080, run:
firewall-cmd --add-port=8080/tcp
firewall-cmd --runtime-to-permanent
2
# Sending emails
There's no special email service on a server, all emails must be sent with the external service.
For 100-150 emails daily, use Gmail.