How to Add Miniflux as a Subdomain to Your Blog

https://xpil.eu/hgsnl

If you鈥檙e running a personal blog and want to add a Miniflux instance as a subdomain, this guide will walk you through the process. By the end, you should have Miniflux accessible via a secure subdomain.

Prerequisites:

  1. A VPS server with SSH access.
  2. Apache web server running your main blog.
  3. Miniflux installed and running on the VPS, typically on port 8080.
  4. Domain name with access to DNS settings.

Note: I am using example.com for the domain name, make sure you replace it with your actual domain.

Another note: the method worked for me; YMMV. Feel warned.

Step 1: Install Nginx and Remove It

馃檪

Initially, I started with Nginx, but later decided to use Apache, because Ockham, so I removed Nginx shortly after installing it. If you have Nginx installed, remove it to avoid conflicts. Or not, if you know what you're doing.

Step 2: Enable Necessary Apache Modules

Apache needs several modules to function as a reverse proxy.

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests
sudo a2enmod ssl

Reload Apache to apply the changes:

sudo systemctl restart apache2

Step 3: Create Apache Configuration for Miniflux

Create a new configuration file for the Miniflux subdomain:

sudo nano /etc/apache2/sites-available/miniflux.example.com.conf

Add the following content:

<VirtualHost *:80>
    ServerName miniflux.example.com

    ProxyPreserveHost On
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

    ErrorLog ${APACHE_LOG_DIR}/miniflux_error.log
    CustomLog ${APACHE_LOG_DIR}/miniflux_access.log combined
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName miniflux.example.com

        ProxyPreserveHost On
        ProxyPass / http://localhost:8080/
        ProxyPassReverse / http://localhost:8080/

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/miniflux.example.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/miniflux.example.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        ErrorLog ${APACHE_LOG_DIR}/miniflux_ssl_error.log
        CustomLog ${APACHE_LOG_DIR}/miniflux_ssl_access.log combined
    </VirtualHost>
</IfModule>

Step 4: Enable the New Site Configuration

sudo a2ensite miniflux.example.com.conf
sudo systemctl reload apache2

Step 5: Update DNS Records

Log in to your domain registrar and create an A record for the subdomain pointing to your VPS鈥檚 IP address.

Step 6: Obtain an SSL Certificate

Use Certbot to obtain an SSL certificate for the subdomain:

sudo certbot --apache -d miniflux.example.com

Follow the prompts to complete the SSL setup.

Step 7: Verify and Reload Apache

Ensure your Apache configuration is correct and reload the service:

sudo apachectl configtest
sudo systemctl reload apache2

Step 8: Access Miniflux

Visit https://miniflux.example.com in your web browser. You should see your Miniflux instance running securely.

https://xpil.eu/hgsnl

Leave a Comment

Komentarze mile widziane.

Je偶eli chcesz do komentarza wstawi膰 kod, u偶yj sk艂adni:
[code]
tutaj wstaw sw贸j kod
[/code]

Je偶eli zrobisz liter贸wk臋 lub zmienisz zdanie, mo偶esz edytowa膰 komentarz po jego zatwierdzeniu.