manual production deploy of alf.io

88 views
Skip to first unread message

Matthijs Cornil

unread,
Nov 15, 2021, 11:01:02 AM11/15/21
to alfio
Hi,

I am trying to have alf.io running on a separate cloud server running ubuntu 20.04.
It is on a sub-domain which is pointed towards the cloud server ip-address via DNS A-record. (main domain is a website on a shared hosting provider).
I was following the configuration as explained in this github guide :

I can't seem to get it to work. The log shows that it booted up, but when I then go to my url I get too many redirects.
Regardless of adding or removing "spring.profiles.active=dev" from the application.properties file.

Any suggestions on how I can fix this?

Kind regards,
Matthijs

Matthijs Cornil

unread,
Nov 22, 2021, 10:00:11 AM11/22/21
to alfio
Fixed the too many redirects, but now I don't get it to work without the spring.profiles.active=dev setting.
Any help for that?

Celestino Bellone

unread,
Nov 23, 2021, 1:06:40 PM11/23/21
to al...@googlegroups.com
Hi,

you need to set X-Forwarded-For and X-Forwarded-Proto headers


Celestino

--
You received this message because you are subscribed to the Google Groups "alfio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alfio+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/alfio/4e510c44-4a6d-4eb2-bb79-c172464d0212n%40googlegroups.com.

Matthijs Cornil

unread,
Nov 24, 2021, 1:44:40 PM11/24/21
to alfio
Thanks for the reply.
I seem to be one step further now after following the examples given. I now just get a page that says that nginx is working correctly but needs further configuration.

This is my current nginx config file (my actual domain exchanged with my.domain.com):
# default server config #
server {
        server_name my.domain.com;

        location /home/alfio/ {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          #Must set X-forwarded-proto to enable sesion cookies secure
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_pass http://localhost:8080;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/my.domain.com/fullchain.pem>
    ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.p>
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

Is there something I am still doing wrong?

Celestino Bellone

unread,
Nov 26, 2021, 8:33:11 AM11/26/21
to al...@googlegroups.com

Alf.io must be exposed at context root, so 

location /home/alfio/ 

should be 

location /


Matthijs Cornil

unread,
Nov 27, 2021, 5:13:52 AM11/27/21
to alfio
Ok, before I had made some other changes I couldn't get through and somehow changing it to /home/alfio/ it worked when dev was active.
But now with the settings as they are changing it back to / did indeed do the trick.

Thank you for your help.

Reply all
Reply to author
Forward
0 new messages