i think i have beef with mkopa now

phone locked

do you know that in Kenya through the imf the Americans want to extend the term limiti to 7 years

who's online

Temiloluwa Sobitan Am inlune

wueh 😆 😆 😆 😆 the pressure

THE ABDUCTION OF THE ISIOLO3(Narrated by Family)

On Saturday,6th July 2024 between 5:30am and 6am, 5 people were abducted in Isiolo Town

Two black Prados and a white Subaru came from different directions.

One from Wabera, the other from taxi stage and the third was packed next to KCB Bank.

The 5 were driven away in a black Prado and driven towards Kisima, where one was released and ordered to lie with his head facing the ground. The other person was left at the Timau Stretch,the same way.

The abductors then drove off with the remaining 3, ISSA OSMAN, NURA ABDI and MUKTAR TACHE.

Family says that the last location of their phones was at Karatina.

Since then, 104 days later, the Isiolo 3 have never been found.

Where are the Isiolo 3?

#FreeIsiolo3
#ImpeachBoth #RutoMustGo

celebrate your small achievements

Kingpin Mkadinali 𝚂𝚒𝚕𝚟𝚎𝚛 𝙰𝚙𝚊𝚛𝚝𝚖𝚎𝚗𝚝𝚜😁

how to run your own radio station
How to install LibreTime 3.0.2 on Debian 11
April 21, 2023 · 14 min read
Jooola

Updated 2023.05.26:

Use a reverse proxy to simplify the LibreTime nginx configuration upgrade.
Fix the Icecast certificates bundle command.

The lack of guides to setup a secure LibreTime server has been a weakness of documentation for a long time now. Users had to search bits and pieces on the Internet, which was probably frustrating. So here is a tutorial that should give a base for anyone that wants to setup a secure LibreTime server.

Note that, I also included the essence of this lengthy post in the official documentation, make sure to have a look.

This tutorial will walk you through the steps required to install LibreTime from a freshly created server, to a fully working and secure installation.
Before you start

Before you start, you will need:

a server running Debian 11 (Bullseye),
a domain name pointing at the server.

note

Most of the command should be usable as-is on Ubuntu 20.04 LTS.
1. Preparing the server

Before anything, make sure that the system is up to date:

sudo apt update
sudo apt upgrade -y

1.1. Configure the time

In this tutorial we will configure the timezone to Europe/Paris, make sure to set your own timezone:

sudo timedatectl set-timezone Europe/Paris

Make sure that the NTP service is enabled:

sudo timedatectl set-ntp true

Finally, check that everything was applied by running timedatectl:

sudo timedatectl

example@libretime:~# sudo timedatectl
Local time: Mon 2022-12-26 18:47:47 CET
Universal time: Mon 2022-12-26 17:47:47 UTC
RTC time: Mon 2022-12-26 17:47:48
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no

1.2. Configure a firewall

To protect the server, you have to install a firewall that will block any undesired network requests to it.

Run the following command to install the firewalld package:

sudo apt install firewalld

By default, firewalld will block any incoming request except on some essential ports such as the ssh port. You need to open some ports to allow users to connect to LibreTime (Nginx), Icecast and Liquidsoap:

# Allow access to Nginx
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
# Allow access to Icecast
sudo firewall-cmd --permanent --add-port=8000/tcp
sudo firewall-cmd --permanent --add-port=8443/tcp
# Allow access to Liquidsoap input harbor
sudo firewall-cmd --permanent --add-port=8001/tcp
sudo firewall-cmd --permanent --add-port=8002/tcp
# Apply the changes
sudo firewall-cmd --reload

Once the changes applied , check your firewall configuration with:

sudo firewall-cmd --list-all

example@libretime:~# sudo firewall-cmd --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: dhcpv6-client http https ssh
ports: 8000/tcp 8443/tcp 8001/tcp 8002/tcp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

2. Installing LibreTime
2.1. Download LibreTime

Download LibreTime from the command-line:

wget https://github.com/libretime/libretime/releases/download/3.0.2/libretime-3.0.2.tar.gz

And extract the tarball:

tar -xvf libretime-3.0.2.tar.gz && cd libretime

2.2. Install LibreTime

To install LibreTime, run the installer and make sure to replace libretime.example.org with your own domain name:

sudo ./install --listen-port 8080 https://libretime.example.org

Show the install logs
2.3. Configure LibreTime

Before running the steps suggested by the installer, edit the LibreTime configuration file to match your requirements:

sudo nano /etc/libretime/config.yml

Change the configuration file timezone to match the one configured in 1.1. Setup the system time.
/etc/libretime/config.yml

# The server timezone, should be a lookup key in the IANA time zone database,
# for example Europe/Berlin.
# > default is UTC
- timezone: UTC
+ timezone: Europe/Paris

For example, you can change the default stream mount point and enable an extra mp3 stream:
/etc/libretime/config.yml

# Icecast output streams.
# > max items is 3
icecast:
# The default Icecast output stream
- <<: *default_icecast_output
enabled: true
public_url:
- mount: main
+ mount: main.ogg
audio:
format: ogg
bitrate: 256

# You can define extra outputs by reusing the default output using a yaml anchor
- <<: *default_icecast_output
- enabled: false
- mount: main-low
+ enabled: true
+ mount: main.mp3
audio:
- format: ogg
- bitrate: 128
+ format: mp3
+ bitrate: 320

2.4. Start LibreTime

Once LibreTime is configured, run the following command to setup the LibreTime database:

sudo -u libretime libretime-api migrate

example@libretime:~# sudo -u libretime libretime-api migrate
Operations to perform:
Apply all migrations: auth, contenttypes, legacy, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0001_initial... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying legacy.0001_initial... OK
Applying legacy.0003_2_5_2... OK
Applying legacy.0004_2_5_3... OK
Applying legacy.0005_2_5_4... OK
Applying legacy.0006_2_5_5... OK
Applying legacy.0007_2_5_9... OK
Applying legacy.0008_2_5_10... OK
Applying legacy.0009_2_5_11... OK
Applying legacy.0010_2_5_12... OK
Applying legacy.0011_2_5_13... OK
Applying legacy.0012_2_5_14... OK
Applying legacy.0013_2_5_15... OK
Applying legacy.0014_2_5_16... OK
Applying legacy.0015_2_5_17... OK
Applying legacy.0016_3_0_0_alpha... OK
Applying legacy.0017_3_0_0_alpha_1... OK
Applying legacy.0018_3_0_0_alpha_6... OK
Applying legacy.0019_3_0_0_alpha_7... OK
Applying legacy.0020_3_0_0_alpha_7_1... OK
Applying legacy.0021_3_0_0_alpha_7_2... OK
Applying legacy.0022_3_0_0_alpha_7_3... OK
Applying legacy.0023_3_0_0_alpha_9_1... OK
Applying legacy.0024_3_0_0_alpha_9_2... OK
Applying legacy.0025_3_0_0_alpha_9_3... OK
Applying legacy.0026_3_0_0_alpha_9_4... OK
Applying legacy.0027_3_0_0_alpha_13_1... OK
Applying legacy.0028_3_0_0_alpha_13_2... OK
Applying legacy.0029_3_0_0_alpha_13_3... OK
Applying legacy.0030_3_0_0_alpha_13_4... OK
Applying legacy.0031_3_0_0_alpha_13_5... OK
Applying legacy.0032_3_0_0_alpha_13_6... OK
Applying legacy.0033_3_0_0_alpha_13_7... OK
Applying legacy.0034_3_0_0_alpha_13_8... OK
Applying legacy.0035_3_0_0_alpha_13_9... OK
Applying legacy.0036_3_0_0_alpha_13_10... OK
Applying legacy.0037_move_stream_settings_to_preferences... OK
Applying legacy.0038_remove_stream_settings_liquidsoap_status... OK
Applying legacy.0039_remove_stream_settings_stats_status... OK
Applying legacy.0040_bump_legacy_schema_version... OK
Applying sessions.0001_initial... OK

Next, check that the required services are running:

# Check that postgresql is running
sudo systemctl status postgresql

# Check that rabbitmq is running
sudo systemctl status rabbitmq-server

# Check that nginx and php-fpm are running
sudo systemctl status nginx php7.4-fpm

example@libretime:~# sudo systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2022-12-26 19:44:44 CET; 1h 54min ago
Main PID: 22428 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 2275)
Memory: 0B
CPU: 0
CGroup: /system.slice/postgresql.service

Dec 26 19:44:44 demo systemd[1]: Starting PostgreSQL RDBMS...
Dec 26 19:44:44 demo systemd[1]: Finished PostgreSQL RDBMS.

example@libretime:~# sudo systemctl status rabbitmq-server
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-12-26 19:44:59 CET; 1h 55min ago
Main PID: 24281 (beam.smp)
Status: "Initialized"
Tasks: 86 (limit: 2275)
Memory: 87.9M
CPU: 42.760s
CGroup: /system.slice/rabbitmq-server.service
├─24281 /usr/lib/erlang/erts-11.1.8/bin/beam.smp -W w -K true -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa -noshell -noinp>
├─24381 erl_child_setup 65536
├─24431 inet_gethost 4
└─24432 inet_gethost 4

Dec 26 19:44:56 demo systemd[1]: Starting RabbitMQ Messaging Server...
Dec 26 19:44:59 demo systemd[1]: Started RabbitMQ Messaging Server.

example@libretime:~# sudo systemctl status nginx php7.4-fpm
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-12-26 19:46:54 CET; 1h 55min ago
Docs: man:nginx(8)
Process: 43732 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 43733 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 43734 (nginx)
Tasks: 3 (limit: 2275)
Memory: 3.3M
CPU: 21ms
CGroup: /system.slice/nginx.service
├─43734 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─43735 nginx: worker process
└─43736 nginx: worker process

Dec 26 19:46:54 demo systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 26 19:46:54 demo systemd[1]: Started A high performance web server and a reverse proxy server.

● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-12-26 19:46:54 CET; 1h 55min ago
Docs: man:php-fpm7.4(8)
Process: 43725 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Main PID: 43722 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 4, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2275)
Memory: 14.9M
CPU: 483ms
CGroup: /system.slice/php7.4-fpm.service
├─43722 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─43723 php-fpm: pool www
└─43724 php-fpm: pool www

Dec 26 19:46:54 demo systemd[1]: php7.4-fpm.service: Succeeded.
Dec 26 19:46:54 demo systemd[1]: Stopped The PHP 7.4 FastCGI Process Manager.
Dec 26 19:46:54 demo systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Dec 26 19:46:54 demo systemd[1]: Started The PHP 7.4 FastCGI Process Manager.

Finally, start LibreTime and check that it's running:

# Start LibreTime
sudo systemctl start libretime.target

# Check that LibreTime is running
sudo systemctl --plain | grep libretime

example@libretime:~# sudo systemctl start libretime.target
example@libretime:~# sudo systemctl --plain | grep libretime
libretime-analyzer.service loaded active running LibreTime Media Analyzer Service
libretime-api.service loaded active running LibreTime API Service
libretime-liquidsoap.service loaded active running LibreTime Liquidsoap Service
libretime-playout.service loaded active running LibreTime Playout Service
libretime-worker.service loaded active running LibreTime Worker Service
libretime-api.socket loaded active running LibreTime API Socket
libretime.target loaded active active LibreTime Services

3. Securing LibreTime
3.1. Install Certbot

The first step to using Let’s Encrypt to obtain an SSL certificate is to install the Certbot software on your server:

sudo apt install certbot python3-certbot-nginx

Let’s Encrypt’s certificates are only valid for ninety days. The Certbot package we installed takes care of this for us by adding a systemd timer that will run twice a day and automatically renew any certificate that’s within thirty days of expiration.

You can query the status of the timer using:

sudo systemctl status certbot.timer

example@libretime:~/libretime# sudo systemctl status certbot.timer
● certbot.timer - Run certbot twice daily
Loaded: loaded (/lib/systemd/system/certbot.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Mon 2022-12-26 21:57:01 CET; 21min ago
Trigger: Tue 2022-12-27 08:12:27 CET; 9h left
Triggers: ● certbot.service

Dec 26 21:57:01 demo systemd[1]: Started Run certbot twice daily.

3.2. Prepare Nginx for obtaining a certificate

Next, you have to configure a reverse proxy to route the traffic from port 80 to LibreTime (port 8080).

Copy the following in a new Nginx configuration file, make sure to replace libretime.example.org with your own domain name:

sudo nano /etc/nginx/sites-available/libretime.example.org.conf

/etc/nginx/sites-available/libretime.example.org.conf

server {
listen 80;
listen [::]:80;

server_name libretime.example.org;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;

proxy_pass http://localhost:8080/;
}
}

Enable the new reverse proxy configuration, make sure to replace libretime.example.org with your own domain name:

sudo ln -s /etc/nginx/sites-{available,enabled}/libretime.example.org.conf

Then, check that the nginx config is valid and reload nginx:

sudo nginx -t

sudo systemctl reload nginx

example@libretime:~/libretime# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
example@libretime:~/libretime# sudo systemctl reload nginx.service

3.3. Obtain a Certificate

Certbot provides a variety of ways to obtain SSL certificates through plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary.

To request a Let’s Encrypt certificate using Certbot with the Nginx plugin, run the following:

sudo certbot --nginx -d libretime.example.org

example@libretime:~/libretime# sudo certbot --nginx -d libretime.example.org
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): example@libretime.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let’s Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
Account registered.
Requesting a certificate for libretime.example.org
Performing the following challenges:
http-01 challenge for libretime.example.org
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/libretime.example.org.conf
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/libretime.example.org.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://libretime.example.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/libretime.example.org/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/libretime.example.org/privkey.pem
Your certificate will expire on 2023-03-26. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let’s Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

3.4 Enable SSL for Icecast

By default, browsers will prevent loading mixed content on secure pages, so you won't be able to listen the insecure Icecast streams on a secure website. To fix that you need to secure the Icecast streams.

Create a Icecast specific SSL certificate bundle:

sudo bash -c "install \
--group=icecast \
--mode=640 \
<(cat /etc/letsencrypt/live/libretime.example.org/{fullchain,privkey}.pem) \
/etc/icecast2/bundle.pem"

Enable the secure socket and set the SSL certificate bundle path in the Icecast configuration file:

sudo nano /etc/icecast2/icecast.xml

/etc/icecast2/icecast.xml

<!-- You may have multiple <listen-socket> elements -->
<listen-socket>
<port>8000</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>
<!--
<listen-socket>
<port>8080</port>
</listen-socket>
-->
- <!--
<listen-socket>
<port>8443</port>
<ssl>1</ssl>
</listen-socket>
- -->

/etc/icecast2/icecast.xml

<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" destination="/status.xsl"/>
<!-- The certificate file needs to contain both public and private part.
Both should be PEM encoded.
<ssl-certificate>/usr/share/icecast2/icecast.pem</ssl-certificate>
-->
+ <ssl-certificate>/etc/icecast2/bundle.pem</ssl-certificate>
</paths>

Restart Icecast to apply the changes:

sudo systemctl restart icecast2

Next, you need to change the LibreTime stream.outputs.icecast.*.public_url configuration to use the newly enabled Icecast secure port:

sudo nano /etc/libretime/config.yml

/etc/libretime/config.yml

# Icecast output streams.
# > max items is 3
icecast:
- <<: *default_icecast_output
enabled: true
- public_url:
+ public_url: https://libretime.example.org:8443/main.ogg
mount: main.ogg
audio:
format: ogg
bitrate: 256

- <<: *default_icecast_output
enabled: true
- public_url:
+ public_url: https://libretime.example.org:8443/main.mp3
mount: main.mp3
audio:
format: mp3
bitrate: 320

Restart LibreTime to apply the changes:

sudo systemctl restart libretime.target

Finally, you need to configure the Certbot renewal to bundle a Icecast specific SSL certificate and restart the Icecast service:

sudo nano /etc/letsencrypt/renewal/libretime.example.org.conf

/etc/letsencrypt/renewal/libretime.example.org.conf

# Options used in the renewal process
[renewalparams]
account = d76ce6a241c7c74f79e5443216ee420e
authenticator = nginx
installer = nginx
server = https://acme-v02.api.letsencrypt.org/directory
+
+deploy_hook = 'bash -c "install --group=icecast --mode=640 <(cat $RENEWED_LINEAGE/{fullchain,privkey}.pem) /etc/icecast2/bundle.pem && systemctl restart icecast2"'

Check that the renewal configuration is valid:

sudo certbot renew --dry-run

4. Tweaking LibreTime

LibreTime should now be accessible at https://libretime.example.org, and you should be able to login with the default username admin with the password admin.
danger

Remember to change your username and password.

LibreTime login page
4.1 Configure the station

To configure the station, go to Settings > General and fill the desired fields:

LibreTime general settings page
Feedback
I hope this tutorial was helpful, feel free to make a comment on the forum.

lesson of the day
Customizing NGINX
per-domain nginx=1 for Nginx-only processing with Nginx reverse proxy
If you're running with the custombuild options.conf setting webserver=nginx_apache, where apache is behind an nginx proxy, then by default, all domains are listed in both the User nginx.conf and httpd.conf. All connections run through the nginx.conf, and some requests are passed through to apache as needed while static files are processed by nginx.

This feature lets you shut off the proxy part, just for 1 domain, such that the domain is processed 100% by nginx, without using apache at all. PHP is still enabled for the nginx-only domain, which must use php-fpm just like stand-alone nginx.

To enable this for a given domain, add:

nginx=1
to the domain's config in:

/usr/local/directadmin/data/users/FRED/domains/DOMAIN.COM.conf
and issue a rewrite:

da build rewrite_confs
JSON and Relative CMD_* calls
CMD_NGINX_TEMPLATES

View the state of a domain
CMD_ADDITIONAL_DOMAINS?action=view&domain=testdomain%2Ecom&ipp=50&json=yes&redirect=yes
is a dump of the domain.com.conf file, and will include this if enabled:

nginx=1
Also:

HAS_PER_DOMAIN_NGINX=yes
will be shown if this value is allowed to be controlled.

Saving the nginx=1 setting
CMD_DOMAIN
method: POST
action=modify
domain=testdomain.com
form_version=1.1
...
nginx=1
Save along with all other settings (php, cgi, etc), OR you can save just this item:

method: POST
action=modify
domain=testdomain.com
only_affect=nginx
nginx=1
Disabling per-domain Nginx-only processing
To disable per-domain Nginx-only processing, use either:

nginx=0
or simply omit the nginx variable entirely, as it is a checkbox, in which the absence of a value equates to 'off'.

Related Skin Changes and Tokens
Within the following file:

/usr/local/directadmin/data/skins/enhanced/user/modify_domain.html
the following has been added after php:

|*if HAS_PER_DOMAIN_NGINX="yes"|
<tr>
<td>|LANG_NGINX_ONLY|</td>
<td align=center><input type="checkbox" name="nginx" value="1" |NGINX_CHECKED|></td>
<td>|LANG_NGINX_ONLY_DESC|</td>
</tr>
|*endif|
Language tokens have been added as well to the file:

/usr/local/directadmin/data/skins/enhanced/lang/en/user/modify_domain.html
which includes:

LANG_NGINX_ONLY=Nginx-Only
LANG_NGINX_ONLY_DESC=Use only Nginx. Proxy to apache is disabled.
User selectable Nginx templates
This feature allows Users to select from pre-made templates to be inserted into the nginx server entries for common scripts like WordPress. The list of templates can be managed through DA.

This is a JSON-only feature, so Enhanced will not have it, though Evolution will.
It will apply only to domains and not to subdomains (similar to E-Mail accounts). Should you need an nginx template on a subdomain, create it as a full domain instead.

JSON and Relative CMD_* calls
CMD_NGINX_TEMPLATES

View the list of Nginx templates
To view the list of nginx templates, and to view the current locations for the domain:

CMD_NGINX_TEMPLATES
method: GET
domain=domain.com
Output will resemble the following:

{
"locations":
{
"/wordpress":
{
"nginx_template": "wordpress_with_fastcgi_cache"
}
},
"settings":
{
"domain_nginx": "0",
"nginx": "1",
"nginx_proxy": "0"
},
"templates":
{
"wordpress_with_fastcgi_cache":
{
"name": "WordPress",
"path": "/etc/nginx/templates/wordpress_with_fastcgi_cache.conf"
}
}
}

The domain_nginx setting will be set to 1 when:

directadmin.conf has:
nginx=0
nginx_proxy=1
And...

/usr/local/directadmin/data/users/fred/domains/domain.com.conf has:
nginx=1
Related: Nginx-only processing for specified domains via the Nginx Reverse Proxy setup

If you have both settings[nginx] and settings[domain_nginx] as 0 (but nginx_proyx=1),then you'd need to throw a warning (as no POSTs will be accepted) advising the User to enable the domain nginx=1 via the only_affect=nginx option: https://www.directadmin.com/features.php?id=2953

Saving a template location setting
To set a given location to a template, use:

CMD_NGINX_TEMPLATES
method: POST
domain=domain.com
action=save
location=/wordpress
nginx_template=wordpress_with_fastcgi_cache
Deleting a template location setting
To clear a list of template locations, use:

CMD_NGINX_TEMPLATES
method: POST
domain=domain.com
action=delete
select1=/wordpress
(select2=/otherpath)
Relative Tokens
The following global token exists:

HAVE_NGINX_TEMPLATES=yes|no
if the feature is available in the current license.

Relative Templates
CustomBuild will manage the templates in /etc/nginx/templates/*.conf.

The format of the template will be a standard nginx code to be inserted into an nginx location block. The first line of the template is a data line, and should contain something like this:

#INFO=name=WordPress
where everything after the #INFO= string is url-encoded, allowing for extra vars in the future. If you do not specify the name, DA will name it the name of the file, less .conf (wordpress_with_fastcgi_cache).

Before the Include to this file, dA will set the $template_location variable to "/wordpress", for example, which can be used in the Included template conf.

location ~ ^(/wordpress)(/.*)?$
{
set $template_location "$1/";
Include /etc/nginx/templates/wordpress_with_fastcgi_cache.conf;
include /usr/local/directadmin/data/users/testuser/nginx_php.conf;
}
DirectAdmin will store the list of locations in:

/usr/local/directadmin/data/users/USERNAME/domains/DOMAIN.COM.locations.json
which is a json file, listing each location. Each location is an array, and the sub-item that applies here would be the template name, eg:

{
"/wordpress" : {
"nginx_template" : "wordpress_with_fastcgi_cache"
}
}
as this leaves other options which could be set for that location in the future.

Nginx locations: new internal structure for tokens
As nginx locations are quite rigid in terms of not allowing conflicts/duplicates, we've hit the point where in order to allow 2 features to use the same location block, internal management is now required.

The following global token will indicate if the feature is available:

HAVE_NGINX_TEMPLATES=yes|no
Relative Templates
The templates exist here:

nginx_server.conf
nginx_server_sub.conf
nginx_server_secure.conf
nginx_server_secure_sub.conf
The old content was as follows:

|*else|
|UNIT_PROXY|
|NGINX_REDIRECTS|
|PROTECTED_DIRECTORIES|
|HOTLINK_PROTECTION|
|EXTRA_LOCATIONS|
|*endif|
And the new content is as follows:

|*else|
|HOTLINK_PROTECTION|
|EXTRA_LOCATIONS|
|LOCATION_BLOCKS|
|*endif|
Using custom global templates with Nginx
This guide will describe how to set up customized global per-User/Domain templates so that your Nginx server configuration can be changed however you need. Note that this guide is a mirror of the similar guide for Apache.

Copy the templates to the custom area:

cd /usr/local/directadmin/data/templates/custom
cp ../nginx_*.conf .
There are many templates for Nginx, so if there are any that you don't need to change, you can delete them from the custom folder and the defaults will be used. Templates in the custom folder override the default templates.

The rest of the changes are very similar to the Apache guide and share essentially the same TOKENS. If you want to see all tokens that you have to work with, you can use the |DUMPTOKENS| token in the Nginx configuration file, issue a rewrite, and it will add all tokens and their values to your configs. Of course, this won't be syntactically valid, but it will let you see what you can work with.

When you want to issue a rewrite to try your new configs, type:

da build rewrite_confs
How to add a custom module to Nginx
If you want to add any extra modules to Nginx, they'll most likely need to be compiled in. Any module that needs to be compiled in will have a --add-module type flag which will need to be used. To add this flag, run the following:

cd /usr/local/directadmin/custombuild
mkdir -p custom/nginx
cp -fp configure/nginx/configure.nginx custom/nginx/configure.nginx
Add your --add-module line to the end of the custom/nginx/configure.nginx file, and make sure the \ character exists at the end of all lines except the last one. The \ character tells the configure line to loop to the next line, making the configure settings easier to read. Without the \ character to trigger the wrap, the next line becomes a separate command, which is not correct. Once set, type:

./build used_configs
to ensure your custom configure.nginx file is being used. Then type:

da build nginx
How to enable PUT and DELETE methods in Nginx
Use the same guide as is used for Apache as it is applicable to Nginx also.

How to force HTTPS with Nginx
If you're running Nginx, go to Admin Level -> Custom Httpd Config -> example.com and in token |CUSTOM4|, add this code:

|*if SSL_TEMPLATE="0"|
return 301 https://$host$request_uri;
|*endif|
How to configure a wildcard *.example.com subdomain with Nginx
This guide is an extension of the Apache version and applies to a server running just Nginx or Apache with Nginx as a proxy (nginx_proxy).

Use step 1 in the other guide to setup the DNS in the same manner.

Use the tool Admin Level -> Custom HTTPD Configuration -> domain.com to edit the Nginx configuration and add this code into the top text area:

server_name *.|DOMAIN|;
In a similar method to that used in the Apache guide, if you want normal control of other subdomains and the full domain, you'll use the zzzz subdomain method:

|*if SUB="zzzz"|
server_name *.|DOMAIN|;
|*endif|
How to setup webmail.example.com with Nginx
Similar to the Apache version of this guide, Nginx has the ability to set up a webmail.domain.com subdomain using the templates.

In this example, we'll be setting up a subdomain for Roundcube, so adjust the value on the left as desired (eg: roundcube or any other script you have in /var/www/html).

You'll need to setup the server section for the webmail subdomain. This can be accomplished by adding a 2nd server section below the domain's main server section.
cd /usr/local/directadmin/data/templates/
cp nginx_server.conf custom/
cp nginx_server_secure.conf custom/
cd custom/
Edit this copied nginx_server.conf, and at the bottom of the template below the existing server section, add this 2nd server section:
server
{
listen |IP|:|PORT_80|;
|MULTI_IP|

server_name webmail.|DOMAIN|;

root /var/www/html/roundcube;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/|DOMAIN|.log;
access_log /var/log/nginx/domains/|DOMAIN|.bytes bytes;
error_log /var/log/nginx/domains/|DOMAIN|.error.log;

|*if HAVE_PHP1_FPM="1"|
# use fastcgi for all php files
location ~ \.php$
{
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/nginx_limits.conf;

if (-f $request_filename)
{
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/webapps.sock;
}
}
|*endif|

|*if HAVE_NGINX_PROXY="1"|
location /
{
# access_log off;
proxy_pass http://127.0.0.1:|PORT_8080|;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /nginx_static_files/
{
# access_log /var/log/nginx/access_log_proxy;
alias /var/www/html/roundcube/;
internal;
}
|*endif|

# deny access to apache .htaccess files
location ~ /\.ht
{
deny all;
}
}
Also modify the secure host nginx_server_secure.conf file. Add:
server
{
listen |IP|:|PORT_443| ssl|SPACE_HTTP2|;
|MULTI_IP|

server_name webmail.|DOMAIN|;

root /var/www/html/roundcube;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/|DOMAIN|.log;
access_log /var/log/nginx/domains/|DOMAIN|.bytes bytes;
error_log /var/log/nginx/domains/|DOMAIN|.error.log;

ssl_certificate |CERT|;
ssl_certificate_key |KEY|;

|*if HAVE_PHP1_FPM="1"|
# use fastcgi for all php files
location ~ \.php$
{
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/nginx_limits.conf;

if (-f $request_filename)
{
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/webapps.sock;
}
}
|*endif|

|*if HAVE_NGINX_PROXY="1"|
location /
{
proxy_buffering |PROXY_BUFFERING|;
proxy_pass https://|PROXY_IP|:|PORT_8081|;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header Upgrade;

}
location /nginx_static_files/
{
# access_log /var/log/nginx/access_log_proxy;
alias /var/www/html/roundcube/;
internal;
}
|*endif|

# deny access to apache .htaccess files
location ~ /\.ht
{
deny all;
}
}
Save, exit, then rewrite users' nginx.conf files with:
da build rewrite_confs
You'll also need to setup the DNS portion.
cd /usr/local/directadmin/data/templates
cp dns_a.conf custom
cd custom
echo "webmail=|IP|" >> dns_a.conf
This will setup the webmail A record for new DNS zones. For existing DNS zones, you'll have to manually add the webmail A record to point to the domains' IPs.

How to activate web cache. Cache-Control HTTP headers
For a bit of threory, please check the apache section.

Activating per domain
Per domain caching can be activated via DirectAdmin admin page -> Custom HTTPD configuration -> find a domain -> nginx.conf , click CUSTOMIZE and in the CUSTOM3 tab, enter the following:

location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico)$ { expires 30d; add_header Cache-Control "public, no-transform"; }
location ~* \.(jpg|jpeg|gif|png|svg)$ {expires 365d;}
location ~* \.(pdf|css|html|js|swf)$ {expires 2d;}
Activating for all domains
To activate globally for all domains, create a directory:

mkdir -p /usr/local/directadmin/data/templates/custom/
cd /usr/local/directadmin/data/templates/custom/
And create a file called cust_nginx.CUSTOM.post, insert the same code as used above for activating for a single domain, and rewrite configs:

da build rewrite_confs
How to install the Pagespeed Nginx module
Mod_pagespeed is an open-source Apache HTTP Server (or Nginx) module, which automatically applies chosen filters to pages and associated assets such as stylesheets, JavaScript, and HTML files, as well as to images and website cache requirements.

One major advantage of this module is that it does not require modifications to existing content or workflow, meaning that all internal optimizations and changes to files are made on the server side, presenting modified files directly to the user. Each of 40+ filters correspond to one of Google's web performance best practices rules.

Tested with Nginx on CentOS 8:

Follow the official documentation concerning the module installation from https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source (see the "Build instructions" section):
Check https://www.modpagespeed.com/doc/release_notes for the latest version (as of today it is "1.13.35.2-stable"):
NPS_VERSION=1.13.35.2-stable
cd
wget https://github.com/apache/incubator-pagespeed-ngx/archive/v${NPS_VERSION}.zip
unzip v${NPS_VERSION}.zip
nps_dir=$(find . -name "*pagespeed-ngx-${NPS_VERSION}" -type d)
cd "$nps_dir"
NPS_RELEASE_NUMBER=${NPS_VERSION/beta/}
NPS_RELEASE_NUMBER=${NPS_VERSION/stable/}
psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}.tar.gz
[ -e scripts/format_binary_url.sh ] && psol_url=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
wget ${psol_url}
tar -xzvf $(basename ${psol_url})
Customize the Nginx config file to add the external module:
cd /usr/local/directadmin/custombuild/
mkdir -p custom/nginx
cp configure/nginx/configure.nginx custom/nginx/
Open the custom/nginx/configure.nginx file and add the following option before the last string:

"--add-module=/root/incubator-pagespeed-ngx-1.13.35.2-stable" \
And build nginx:

da build nginx
When completed, you should see the "--add-module=/root/incubator-pagespeed-ngx-1.13.35.2-stable" in the output of:

nginx -V
Create the working directory:
mkdir -p /var/cache/ngx_pagespeed
Open the /etc/nginx/nginx-includes.conf file and add the following to enable the module globally:

pagespeed on;
pagespeed FileCachePath /var/cache/ngx_pagespeed;
pagespeed EnableFilters flatten_css_imports;
And restart Nginx:

systemctl restart nginx
Test if it is working with:
curl -ILs domain.com | grep X-Page-Speed
You should be able to find text similar to the following in curl's output:

X-Page-Speed: 1.13.35.2-0
Adding security headers to get A+ rating
This guide is similar to the apache guide for adding security headers, but is tailored to the Nginx webserver. You may refer to the mentioned Apache guide for generalized information regarding security headers and online tools for testing them. Here are the instructions for accomplishing the same with Nginx:

Create the /usr/local/directadmin/data/templates/custom/cust_nginx.CUSTOM.post file

Post the code:

add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1";
add_header X-Download-Options "noopen";
add_header X-Permitted-Cross-Domain-Policies "master-only";
add_header X-DNS-Prefetch-Control "on";
add_header Referrer-Policy "no-referrer-when-downgrade";
add_header Strict-Transport-Security "max-age=31536000";
add_header Content-Security-Policy "block-all-mixed-content";
add_header Permissions-Policy 'geolocation=*, midi=(), sync-xhr=(self "https://|DOMAIN|" "https://www.|DOMAIN|"), microphone=(), camera=(), magnetometer=(), gyroscope=(), payment=(), fullscreen=(self "https://|DOMAIN|" "https://www.|DOMAIN|" )';

And rewrite configs:
da build rewrite_confs
How to enable brotli compression
Extract brotli under any path you prefer. In this case I chose to to extract it in the base of the custombuild directory.
cd /usr/local/directadmin/custombuild
mkdir brotli
git clone https://github.com/google/ngx_brotli.git brotli
cd brotli && git submodule update --init && cd ..
Add a custom add-module directive.
mkdir -p custom/nginx
cp -p ./configure/nginx/configure.nginx custom/nginx/
Add the following somewhere before the last configuration line in custom/nginx/configure.nginx

"--add-module=/usr/local/directadmin/custombuild/brotli" \
make sure to substitute /usr/local/directadmin/custombuild/brotli with whatever path it's been extracted under.

rebuild nginx
da build nginx
This should have compiled nginx with the brotli module.

You can configure brotli by modifying /etc/nginx/nginx-includes.conf. Refer to the documentation found here.

To test that the configuration was successful, add the following to /etc/nginx/nginx-includes.conf:
brotli on;
brotli_static on;
Restart nginx

systemctl restart nginx
curl one of your domains (exampledomain.com in this example).

curl -kL -I -H 'Accept-Encoding: br' http://exampledomain.com 2>&1 | grep -i encoding
If successful, the following output should be returned

Content-Encoding: br

as an African my father brought me up with nothing
i still have nothing
and so shall my sons
please my people kindly help me help myself

followers

No Followers

Photo Albums
SPONSORED
3 Column metallic wardrobe

3-Column Portable Metallic Wardrobe is an excellent storage solution for keeping your clothes, shoes, and accessories neatly organized. Designed with a sturdy metal frame, it ensures durability, stability, and long-lasting use.

Jalas Fencing & Landscaping Premium Fencing | CCTV Installations & Live Monitoring | Landscape Design & Maintenance +254726017086

Transform Your Property Expert Fencing • Advanced Security • Beautiful Landscaping

FIGHT FOR AFRICA

The colonisers are funding religion conflict in between the religious beliefs in Africa, they always have been funding religion slavery enforcement rather than building schools, hospitals or our Agriculture so that we Africans can be poorly led , sick , uneducated and hungry. Let's call modern day slavery as it is , the colonisers never loved us!! That's why they dug holes in our father's feet and chain ⛓️ us like flock for slaughter, this inhumane acts are silently happening in our own African continent in 2025 Sudan, Tanzania , Libya and Congo. We must fight against our enemies together not against our brothers because of the religion division they brought. We are stronger United. If their heaven is real in their religion a black man would never be welcome.

DECOLONISE AFRICA FEEDS -Afro feeds A SUBSIDIARY OF DECOLONISE AFRICA MISSION

We are dedicated to promoting sustainable agriculture through indigenous seeds and high-quality animal feeds. Our mission is to decolonize food systems by providing affordable, natural solutions for farmers and livestock owners. A SUBSIDIARY OF DECOLONISE AFRICA MISSION

Play and win Free chicken

To learn about housing

Baofeng Quality Security Walkie Talkie Radio Calls-4 Pcs

Baofeng 2-Way Radio Walkie Talkie is a great gadget to have in your home for those camping trips with friends or the family. It has a talk range of 3-5km which makes it perfect for outdoor use. A wide range of businesses can also benefit from having this 2-Way Radio Walkie Talkie. It has been designed for high performance and the signal strength is always exceptional even in the most remote places. When travelling in a large group, it is essential to have an innovative gadget like this which will allow everyone to be in touch. It is also a great device in cases of emergencies.Baofeng 2-Way Radio Walkie Talkie has a solid and tough build which makes it capable of standing the test of time. Its built-in 2800mAh battery is highly efficient and guarantees a standby time of up to 50 hours. When hiking over long distances, some people will not be able to keep up with the pace while others might want to enjoy the serene environment so by having this 2-Way Walkie Talkie, everyone can remain in contact even when some are way ahead. This well-designed gadget delivers instant communication as you do not have to dial or wait to be connected to the other person. It has a very simple operation and is easy to use