doccano / doccano

Open source annotation tool for machine learning practitioners.
MIT License
9.1k stars 1.67k forks source link

Doccano not displayed properly in browser when not assigned base website URL #2332

Open Fabien-Maury opened 2 months ago

Fabien-Maury commented 2 months ago

How to reproduce the behaviour

I have access to a remote VM associated with a domain name that I am using for web hosting with an apache2 server. I want one of the web pages to be the Doccano home page to make an annotation project accessible to the Internet.

When I give the root URL ("/") to the Doccano service in /etc/apache2/sites-available/config.conf, I can access Doccano properly in my browser with the URL : https://my-domain.com . But I don't want the Doccano service to be my website home page, I want it to be located on https://my-domain.com/doccano . If I assign the Doccano service this url ("/doccano") in the apache2 config file, and then try to access https://my-domain.com/doccano in my browser, the Doccano home page is not displayed properly (I get a reponse, part of the page is loading, like the favicon and some kind of loading animation : see screenshot problem ).

this is my apache2 config file:

<VirtualHost *:80>
    ServerName makaao.paris.inria.fr
    Redirect / https://makaao.paris.inria.fr/
</VirtualHost>

<VirtualHost *:443>
    ServerName makaao.paris.inria.fr

    SSLEngine on
    SSLCertificateFile /etc/dsissl/auto/makaao.paris.inria.fr/cert.pem
    SSLCertificateKeyFile /etc/dsissl/auto/makaao.paris.inria.fr/privkey.pem
    SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
    SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
    SSLHonorCipherOrder on
    SSLCompression off
    SSLSessionTickets off

    # Serve your custom home page
    DocumentRoot /var/www/html
    <Directory /var/www/html>
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # Directories for Doccano
    ProxyPass /doccano http://localhost:8000/
    ProxyPassReverse /doccano http://localhost:8000/

    # WebSocket support for Doccano
    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/doccano/(.*)$ ws://localhost:8000/$1 [P,L]

    # Directories for Virtuoso
    ProxyPass /virtuoso http://localhost:8890/
    ProxyPassReverse /virtuoso http://localhost:8890/

    ErrorLog ${APACHE_LOG_DIR}/virtuoso_error.log
    CustomLog ${APACHE_LOG_DIR}/virtuoso_access.log combined
</VirtualHost>

Your Environment