sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
237 stars 94 forks source link

wwsympa always returns HTTP status code 421 and empty page after update to 6.2.72 #1791

Open bohrsty opened 5 months ago

bohrsty commented 5 months ago

I updated my sympa installation to version 6.2.72 and the web interface (wwsympa) stops working, it shows an empty page with HTTP status code 421 (Misdirected Request).

Version

sympa: 6.2.72 sympa-nginx: 6.2.72

Installation method

rpm (fedora 36, but same behavior after upgrade to fedora 38) wwsympa uses "virtual domain settings" with robot.conf

Expected behavior

Show the wwsympa web interface after opening the url.

Actual behavior

Empty page with HTTP status code 421 after opening the url.

Steps to reproduce

Opening the url (after upgrade from 6.2.70 to 6.2.72)

Additional information

The nginx log only shows the request and the status code 421:

<IPv6 address> - - [18/Jan/2024:21:57:44 +0100] "GET /sympa/info/info-ls HTTP/1.1" 421 11 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"

With log_level 3 sympa.log shows these entries during request and nothing more:

Jan 18 21:32:05 lists wwsympa[2199]: debug2 Sympa::List::get_robots()
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: ORIG_PATH_INFO=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: ORIG_SCRIPT_NAME=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: PATH_INFO=/info/info-ls
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: QUERY_STRING=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REMOTE_ADDR=`<IPv6 address>
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REMOTE_HOST=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REQUEST_METHOD=GET
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SCRIPT_NAME=/sympa
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SERVER_NAME=<server name>
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SERVER_PORT=443
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SYMPA_DOMAIN=
Jan 18 21:32:05 lists wwsympa[2199]: debug2 Sympa::List::get_robots()
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: ORIG_PATH_INFO=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: ORIG_SCRIPT_NAME=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: PATH_INFO=/info/info-ls
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: QUERY_STRING=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REMOTE_ADDR=`<IPv6 address>
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REMOTE_HOST=
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: REQUEST_METHOD=GET
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SCRIPT_NAME=/sympa
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SERVER_NAME=<server name>
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SERVER_PORT=443
Jan 18 21:32:05 lists wwsympa[2199]: debug main:: SYMPA_DOMAIN=
ikedas commented 5 months ago

Hi @bohrsty , Could you please show the settings of nginx and Smpa?

bohrsty commented 5 months ago

Sure: nginx/sympa.conf:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name lists.bohrs.net judo.bohrs.net;

    access_log /var/log/nginx/sympa_ssl_access.log;

    ssl_certificate /etc/letsencrypt/lists.bohrs.net/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/lists.bohrs.net/key.pem;

    location / {
#        return 301 https://$host/sympa;
        root /var/www/judo.bohrs.net;
    }

    location /sympa {
        include       /etc/nginx/fastcgi_params;
        fastcgi_pass  unix:/run/sympa/wwsympa.socket;

        # If you changed wwsympa_url in sympa.conf, change this regex too!
        fastcgi_split_path_info ^(/sympa)(.*)$;
        fastcgi_param SCRIPT_FILENAME /usr/libexec/sympa/wwsympa.fcgi;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

    location /static-sympa/css {
        alias /var/lib/sympa/css;
    }
    location /static-sympa/pictures {
        alias /var/lib/sympa/pictures;
    }
    location /static-sympa {
        alias /usr/share/sympa/static_content;
    }
}

sympa.conf:

########################################################################
# Initial configuration
# See https://sympa-community.github.io/manual/install/generate-initial-configuration.html
########################################################################

domain              judo.bohrs.net
listmaster          <secret>
lang                de

########################################################################
# Setup database
# See https://sympa-community.github.io/manual/install/setup-database.html
########################################################################

db_type             MySQL
db_name             sympa
db_host             localhost
#db_port
db_user             sympa
db_passwd           <secret>
#db_env

########################################################################
# Configure system log
# See https://sympa-community.github.io/manual/install/configure-system-log.html
########################################################################

#syslog              LOCAL1 
#log_socket_type     unix

########################################################################
# Configure mail server
# See https://sympa-community.github.io/manual/install/configure-mail-server.html
########################################################################

sendmail_aliases    /etc/sympa/sympa_transport
aliases_program     postmap
aliases_db_type     hash
#sendmail            /usr/sbin/sendmail
#sendmail_args       (if you use sendmail(1), this need not change)

########################################################################
# Configure HTTP server
# See https://sympa-community.github.io/manual/install/configure-http-server.html
########################################################################

#mhonarc             /usr/bin/mhonarc
#log_facility        LOCAL1

# If you chose single domain setting, you may have to define following
# parameters in this sympa.conf file.  Otherwise, if you chose virtual
# domain setting (recommended), you should define them in robot.conf by
# each domain.

#wwsympa_url         (You must define this parameter to enable web interface)

########################################################################
# Customizing Sympa
# You can customize Sympa, its web interface and/or SOAP/HTTP service
# defining more parameters in this file sympa.conf or robot.conf by each
# domain.
# For more details see https://sympa-community.github.io/manual/customize.html
########################################################################

robot.conf:

wwsympa_url     https://judo.bohrs.net/sympa
title           BFV LS - Mailservice
gecos           BFV LS Mailservice

Are these sufficient, or do you need more?

But as far as I know, none of these configs changed during the update...

ikedas commented 5 months ago

What is the full path of robot.conf?

bohrsty commented 5 months ago

The path is /etc/sympa/judo.bohrs.net/robot.conf

ikedas commented 5 months ago
    server_name lists.bohrs.net judo.bohrs.net;

This line should be

    server_name judo.bohrs.net;

Or, if you want to use the both host names as Sympa's virtual hosts, insert this line just after incude line:

fastcgi_param SERVER_NAME $host;
bohrsty commented 5 months ago

Thank you so far, the webinterface works again after adding the suggested line...

But now all icons are not shown, they are only rectangles with the corresponding hex-codes in it (like F015)... I cannot see any errors in the browser console or errors loading any file in network-tab...Have you an idea, what causes this problem?

bohrsty commented 3 months ago

@ikedas any news about those icons?

ikedas commented 3 months ago

@bohrsty , how about removing location / { … }?

bohrsty commented 2 months ago

@ikedas, I've tried, but it doesn't change anything...

ikedas commented 2 months ago

@bohrsty , please see the documentation to configure HTTP server from scratch.