# Server Customization
The Upgrade script overrides all the modifications that made in server configurations, but there are several ways to make customization properly.
# Custom PHP configuration
Create 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
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 reaip 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 customize 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 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 new file in /etc/my.cnf.d/
directory with .cnf
extension. For example, /etc/my.cnf.d/x-overrides.cnf
with.
Restart MariaDB:
systemctl restart mysql
# Firewall
To open a port, run:
firewall-cmd --permanent --add-port=port_number/tcp
For example, to open port 80, run:
firewall-cmd --permanent --add-port=80/tcp
To add a range of ports, tun:
firewall-cmd --permanent --add-port=6500-6700/udp
To add several ports with one command (here for port 80 and 443):
firewall-cmd --permanent --add-port=80/tcp --add-port=443/tcp
# 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.