Need help upgrading from Indico 0.99


#22

There is something wrong with redirects in your webserver.

The URL Indico tries to load (which is correct) is https://indico3.riken.jp/js/indico/modules/registration/form/tpls/registrationform.tpl.html - but Apache sends a 301 redirect to https://indico3.riken.jp/modules/registration/form/tpls/registrationform.tpl.html which is wrong.

I think you added a redirect to move from /indico/... to /... but might have forgotten to anchor the regex used there to match only at the beginning of the URL (i.e. you need ^/indico instead of /indico).

I just saw the rewrite rules earlier in this thread, and this is indeed the case.

RewriteRule indico/(.*)$ /$1 [R=permanent,L]

should probably be

RewriteRule ^/indico/(.*)$ /$1 [R=permanent,L]

Note that you might need have to clear your browser cache since 301 redirects are usually cached (but maybe browsers are smart enough to not do that if the redirect points to a 404).


#23

(Two apache httpd files)

[indico3 conf.d] pwd
/etc/httpd/conf.d
[indico3 conf.d]  cat indico-sslredir.conf
<VirtualHost *:80>
    ServerName indico3.riken.jp
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
[indico3 conf.d] 


[indico3 conf.d] cat indico.conf
<VirtualHost *:443>
    ServerName indico3.riken.jp
    DocumentRoot "/var/empty/apache"

    SSLEngine               on
    SSLCertificateFile      /etc/ssl/indico3-20180221/indico3.riken.jp.cer
    SSLCertificateChainFile /etc/ssl/indico3-20180221/nii-odca3sha2.cer
    SSLCertificateKeyFile   /etc/ssl/indico3-20180221/indico3-key.pem

   SSLProtocol             all -SSLv2 -SSLv3

#    SSLCipherSuite          ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
#

    SSLHonorCipherOrder     on

    XSendFile on
    XSendFilePath /opt/indico
    CustomLog /opt/indico/log/apache/access.log combined
    ErrorLog /opt/indico/log/apache/error.log
    LogLevel error
    ServerSignature Off

    AliasMatch "^/static/assets/(core|(?:plugin|theme)-[^/]+)/(.*)$" "/opt/indico/assets/$1/$2"
    AliasMatch "^/(css|images|js|static(?!/plugins|/assets|/themes|/custom))(/.*)$" "/opt/indico/web/htdocs/$1$2"
    Alias /robots.txt /opt/indico/web/htdocs/robots.txt

    SetEnv UWSGI_SCHEME https
    ProxyPass / uwsgi://127.0.0.1:8008/

# https://talk.getindico.io/t/need-help-upgrading-from-indico-0-99/180/12
# should do the trick.
#
    RewriteEngine On
    RewriteRule indico/(.*)$ /$1 [R=permanent,L]
#

    <Directory /opt/indico>
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>
[indico3 conf.d] 

[indico3 etc] cat /opt/indico/etc/indico.conf

# General settings
SQLALCHEMY_DATABASE_URI = 'postgresql:///indico'
SECRET_KEY = '******'
BASE_URL = 'https://indico3.riken.jp'
CELERY_BROKER = 'redis://127.0.0.1:6379/0'
REDIS_CACHE_URL = 'redis://127.0.0.1:6379/1'
CACHE_BACKEND = 'redis'
DEFAULT_TIMEZONE = 'Asia/Tokyo'
DEFAULT_LOCALE = 'en_GB'
ENABLE_ROOMBOOKING = False
CACHE_DIR = '/opt/indico/cache'
TEMP_DIR = '/opt/indico/tmp'
LOG_DIR = '/opt/indico/log'
ASSETS_DIR = '/opt/indico/assets'
STORAGE_BACKENDS = {'default': 'fs:/opt/indico/archive', 'legacy': 'fs-readonly:/opt/indico/legacy-archive'}
ATTACHMENT_STORAGE = 'default'
ROUTE_OLD_URLS = True
XELATEX_PATH = '/opt/texlive/bin/x86_64-linux/xelatex'

# Email settings
SMTP_SERVER = ('127.0.0.1', 25)
SMTP_USE_TLS = False
SMTP_LOGIN = ''
SMTP_PASSWORD = ''
SUPPORT_EMAIL = 'indico@xxx.riken.jp'
PUBLIC_SUPPORT_EMAIL = 'indico@xxx.riken.jp'
NO_REPLY_EMAIL = 'noreply@xxx.riken.jp'

STATIC_FILE_METHOD = 'xsendfile'
[ndico3 etc] 

#24

Thanks.
Replacing the statement

RewriteRule indico/(.*)$ /$1 [R=permanent,L]

with

RewriteRule ^/indico/(.*)$ /$1 [R=permanent,L]

solved this problem !


#25

Please change the SECRET_KEY in your indico.conf as soon as possible! Anyone with that key can generate e.g. email validation links used to reset passwords (and thus take over e.g. your admin account)!

You can generate a new one to copy&paste there by running this command in your terminal:

python -c 'import os; print repr(os.urandom(32))'

#26

Thank you again. I did it.


#27

3 posts were split to a new topic: How to add new currencies?


#28

Finally our indico production server https://indico2.riken.jp/
was updated from indico 0.99 to 2.0.1 today.
Thank you for your support.
Takashi Ichihara


#29

Happy to hear that! :wink: