This creates a subpath behind the domain of your server. For example https://ismus.net/gitea. (source)
/etc/apache2/conf-available create a fitting .conf-file for your service. Here e.g. for gitea <cli> <Location /gitea>
ProxyPass http://localhost:3000 nocanon ProxyPassReverse http://localhost:3000
</Location> </cli>
sudo a2enconf gitea resp. your conf-file.sudo systemctl reload apache2 your server to have it work./etc/apache2/sites-available create a new file with <subdomain>.conf.<cli> <IfModule mod_ssl.c>
<VirtualHost *:443>
ProxyPreserveHost On
ProxyPass "/" "http://localhost:3000/"
ProxyPassReverse "/" "http://localhost:3000/"
ServerName subdomain.yourserver.net
TransferLog /var/log/apache2/access.log
ErrorLog /var/log/apache2/error.log
SSLCertificateFile /etc/letsencrypt/live/yourserver.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourserver.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule> </cli>
sudo a2ensite subdomain andsudo systemctl reload apache2