Issues with new networks or networks with changes URLs

Any issue about installation and configuration of the Cyclos 4 version

Moderators: rmvanarkel, hugo, alexandre

Post Reply
admin_de2
Posts: 81
Joined: Wed Dec 31, 1969 9:00 pm

Issues with new networks or networks with changes URLs

Post by admin_de2 »

Dear Cyclos-Devops,

i newly discovered an issue in cyclos, which is either a big, but at least "strange behavior":

When i change an URL of an existing network, custom images and in some cases as well system images can't be displayed.
They still contain the old networks's URL and therefore a CORS failure appears in the browser console.

I'd like to find out if it is possible to save image paths relatively while at the same time keeping the relation to a network or configuration.

Can you make an issue to implement out of it?
I can imagine that it would be not that easy, maybe, due to relations to networks/configs as mentioned. But maybe i'm wrong and it is relatively easy.

Or do you have another idea with that issue?

Thank you very much, Thomas
canoodle
Posts: 12
Joined: Sun Feb 04, 2018 8:33 pm

Re: Issues with new networks or networks with changes URLs

Post by canoodle »

for example do you consider this apache 2 reverse proxy config as optimal? (it is tested and works, but there seem to be logo "glitches")

cat /etc/httpd/conf.d/default-site.conf

Code: Select all

<VirtualHost *:80 *:443>
        <IfModule mod_jk.c>
            JkMount /* ajp13_worker
            JkMount / ajp13_worker      
        </IfModule> 

        ServerName domain.com
        ServerAlias www.domain.com
        ServerAdmin webmaster@domain.com
        ErrorLog /var/log/httpd/error.log
        CustomLog /var/log/httpd/access.log combined

        ProxyPass /global/ http://0.0.0.0:8080/global/
        ProxyPassReverse /global/ http://0.0.0.0:8080/global/
        ProxyPass / http://0.0.0.0:8080/global/
        ProxyPassReverse / http://0.0.0.0:8080/global/

        RewriteEngine on
        RewriteCond %{SERVER_NAME} =domain.com [OR]
        RewriteCond %{SERVER_NAME} =www.domain.com
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
everything after "RewriteEngine on" was added by Let's Encrypt bot. (usually doing a good job providing free and valid monthly auto renewaing ssl certs)

background of the question:

how does cyclos generate the urls for network-logos?

sometimes it happens that the cyclos-symbols are all loading fine but the network-logos "disappear" and get the url 127.0.0.1:8080 ? (which is of course not the correct path to the logo)

manually updating the static content -> network-logo fixes the problem... hopefully permanently.
canoodle
Posts: 12
Joined: Sun Feb 04, 2018 8:33 pm

Re: Issues with new networks or networks with changes URLs

Post by canoodle »

problem with the above config is, that logins are forwarded as "127.0.0.1"

"10 wrong logins from IP-Adress 127.0.0.1"

can anybody recommend a fix?
canoodle
Posts: 12
Joined: Sun Feb 04, 2018 8:33 pm

Re: Issues with new networks or networks with changes URLs

Post by canoodle »

1.3.6. Configuring Cyclos to work behind a proxy / load balancer

https://documentation.cyclos.org/4.13/c ... ml#d0e483

bocking users per ip is not done via apache (would be good if cyclos also logs bad logins to /var/log/cyclos.log or something)

in order for apache(2) to forward the real ips of clients to tomcat/cyclos changes to:

Code: Select all

cyclos.properties
folgendes geändert:

Code: Select all

cyclos.header.remoteAddress = X-Forwarded-For
cyclos.header.protocol = X-Forwarded-Proto
in this case, it is logged to:

==> /opt/tomcat/temp/cyclos4/logs/global-services.0.log <==
Post Reply