Use Remote includes to share your configuration

Remote includes are a great way to share your configuration settings between servers.

You simply put your (shared) configuration files on a secure location, like a trusted web server. IRC servers will then fetch the configuration from there when they boot or the configuration is /REHASH'ed.

In the example below we will assume you have a website called sisrv.net:

Create and password-protect a HTTP directory

Note: operations below are executed on the shell and assume shell access. You may possibly achieve the same via an admin panel like cPanel and SCP/SFTP.

  • SSH to your www shell, go to the WWW directory and create a directory to store the configuration files:
ircd@server:~$ cd public_html
ircd@server:~/public_html$ mkdir conf
ircd@server:~/public_html$ cd conf
ircd@server:~/public_html/conf$
  • Create an .htaccess file
ircd@server:~/public_html/conf$ nano .htaccess

Put in that file the following (change the path where needed!):

AuthType Basic
AuthName "My restricted conf files"
AuthUserFile /home/sisrv/public_html/conf/.htpasswd
require valid-user
  • Create a .htpasswd file with the appropriate password
ircd@server:~/public_html/conf$ htpasswd -c /home/sisrv/public_html/conf/.htpasswd ircd
New password:
Re-type new password:
Adding password for user 'ircd'
  • Create or upload a file called staff.conf in this ~/public_html/conf/ directory.

Use remote includes to fetch the conf

This is simple, you just write down the URL in the include directive. In our example that would be like this:

HTTPS is best, but requires your site to have HTTPS enabled:

include "https://ircd:yourpasswd@sisrv.net/conf/staff.conf";
include "https://ircd:yourpasswd@sisrv.net/conf/vpn-proxy.conf";
include "https://ircd:yourpasswd@sisrv.net/conf/spamfilter.conf";

What if your web server is down

When UnrealIRCd can't load a remote include it will used a "cache copy" (stored in the cache/ subdirectory in UnrealIRCd). A cached copy is always available, unless you are including the URL for the first time.

This way, you can safely use remote includes. Even if there's an outage at your web server, your IRC servers will still be able to boot or REHASH. (Many years ago this wasn't the case and an outage of the web servers would cause a really problematic situation)

  • remote includes, share configurations
  • 24 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Upgrading from UnrealIRCd 4 to UnrealIRCd 5

Upgrading from UnrealIRCd 4.x to UnrealIRCd 5.x is really easy, there are almost no configuration...

How to install UnrealIRCd modules

UnrealIRCd has a module manager which allows you to install, update and uninstall 3rd party...

UnrealIRCd FAQ

Is UnrealIRCd suitable for me? UnrealIRCd is a highly advanced and customizable IRC daemon. It...

How to install UnrealIRCd 5

To install UnrealIRCd on Linux, FreeBSD, OpenBSD, OS X and other *NIX systems you generally...

How to link Unrealircd servers

This page explains how to link two (or more) UnrealIRCd servers securely so you have a...

Powered by WHMCompleteSolution