Jump to content

Accessing utserver webui through apache reverse proxy


giovi321

Recommended Posts

 

I have installed on a Debian 10 virtual machine utserver (utorrent server for linux), and on the host machine I have an apache instance that, through a reverse proxy, allows to access the utserver webapp through its ip address the the utserver instance (https://10.10.10.10/torrent).

However, utserver does not allow to change the base url (that is ipaddress:8080/gui). With the reverse proxy I managed to connect to the page of utserver but all the scripts do not load, infact opening the firefox console I can see that apache is looking in the wrong place:

Loading failed for the <script> with source “https://10.10.10.10/gui/web/js/lib/common.js”.

Below is the configuration for apache on the host machine:

<IfModule mod_proxy.c>
<VirtualHost 10.10.10.10:80>
        RewriteEngine On
        RewriteCond %{HTTPS} !=on
        RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

<VirtualHost 10.10.10.10:443>
        ServerName 10.10.10.10
        ServerAdmin unavailable
        DocumentRoot /var/www

        <Directory /var/www/>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
        </Directory>


        ProxyRequests off
        ProxyPreserveHost on
        ProxyPass /torrent/ http://192.168.56.109:8080/
        ProxyPassReverse /torrent/ http://192.168.56.109:8080/
        ProxyVia On

        ErrorLog ${APACHE_LOG_DIR}/vhosts/vpn_vhosts_error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/vhosts/vpn_vhosts_access.log combined

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/server.crt
        SSLCertificateKeyFile /etc/apache2/ssl/server.key
        SSLProxyEngine on
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        <Proxy *>
          Order Allow,Deny
          Allow from all
        </Proxy>

</VirtualHost>
</IfModule>

What am I doing wrong? Is there a way to change the base url of utserver (i.e. adding /torrent/ at the beginning)?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...