Help configuring apache virtual host for Seafile

I installed Seafile on Ubuntu 16.04 for personal home use. I followed this guide and everything works smoothly. However, I need help properly configuring the Apache virtual host for HTTP and HTTPS.

I do NOT have a domain name, so I will always access Seafile server using IP of the server. What I want is to be able to access Seafile by going to

I followed the guide, Config Seahub with Apache, however, the virtual host configuration causes the Seafile interface to show up whenever I go to I only want Seafile interface to show up when I go to

Below is the exact configuration I am using. Note how I have commented out “ServerName”. This reason for this is because if my router changes the IP of the server, I don’t have to come back and update the virtual host file.

<VirtualHost *:80>
    # ServerName
    # Use "DocumentRoot /var/www/html" for Centos/Fedora
    # Use "DocumentRoot /var/www" for Ubuntu/Debian
    DocumentRoot /var/www
    Alias /media  /home/user/haiwen/seafile-server-latest/seahub/media

    RewriteEngine On

    <Location /media>
        Require all granted

    # seafile fileserver
    ProxyPass /seafhttp
    ProxyPassReverse /seafhttp
    RewriteRule ^/seafhttp - [QSA,L]

    # seahub
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    ProxyPass /
    ProxyPassReverse /

Also I have one more question. Do I always have to change the SERVICE_URL and FILE_SERVER_ROOT settings if the IP address of the server changes? For example a scenario when the server IP address is, but later it may get changed to “”.