Schlagwörter: 

Ansicht von 15 Antwort-Themen
  • Autor
    Beiträge
    • #11958
      Giordano Torre
      Teilnehmer

        Good Morning,

        How can I choose the default page?

        Now if I click on supporto.XXXXXX.it, the customer user is automatically redirected on agent page. I’d like automatically redirect the customer on customer page (otobo/customer.pl).

        I have tryed to change FQDN in otobo system but doesn’t works fine.

        Now DNS are configured as http://www.supporto.XXXXX.it.

        Thank You

      • #11960
        Giordano Torre
        Teilnehmer

          Good Morning,

          I’d like modify nginx file configuration because I make customer page as default.

          I have installed otobo with docker-compose but I don’t find the nginx configuration file.

          Where can I find it?

          How can I modify it?

          Thank You

           

        • #11962
          bes
          Teilnehmer

            Hi Giordiano,

            we are thinking about making this easier, especially as AFAIK this was a simple SysConfig setting in OTRS 6. Fpr now we recomment a bit more convoluded way. The default page can indeed be set in the nginx configuration. Doing this in the running works, but your changes would be lost after a restart of the container. Therefore the config should be changed in a volume, which will persist when the container is stopped and started again.

            See https://doc.otobo.org/manual/installation/stable/en/content/installation-docker.html#custom-configuration-of-the-nginx-webproxy for how to create the custom config.

            In the file otobo_nginx.conf.template you can then add something like:

            location = / {
            return 301 otobo/customer.pl
            }
            location / { … same as before … }

            Please give feedback when the works, or doesn’t work, for you. I’ll add it then as an example the documentation.

             

          • #11963
            Giordano Torre
            Teilnehmer

              Thank You.

              I will try it….:-)

               

               

            • #11965
              Giordano Torre
              Teilnehmer

                I have tryed but it doesn’t work fine.

                I have added but nothing

                Thank You

              • #11966
                bes
                Teilnehmer

                  Hi Giordiano,

                  from the screenshots I gather that you have created a volume and that you have adapted the custom config file. Did you also adapt the file .env ? If yes, you can check your Nginx container.

                  bes:~/devel/OTOBO/otobo-docker (rel-10_0)$ docker exec -it otobo_nginx_1 bash
                  root@e1ce50e91562:/etc/nginx# more /etc/nginx/config/template-custom/otobo_nginx.conf.template
                  more: stat of /etc/nginx/config/template-custom/otobo_nginx.conf.template failed: No such file or directory
                  root@e1ce50e91562:/etc/nginx# exit
                  exit

                  bes:~/devel/OTOBO/otobo-docker (rel-10_0)$

                  In my installation I don’t have a custom config installed. But you should see your adapted config. If the custom config looks fine and the redirect still does not work you can try first to restart the container.

                  docker-compose restart nginx

                  Good luck,

                  Bernhard

                   

                • #11967
                  Giordano Torre
                  Teilnehmer

                    Good Morning Bernhard,

                    I have followed these setting, too….

                    After setting up the volume, the adapted configuration must be activated. The new volume is set up in docker-compose/otobo-nginx-custom-config.yml. Therefore this file must be added to COMPOSE_FILE. Then Nginx must be directed to use the new config. This is done by setting NGINX_ENVSUBST_TEMPLATE_DIR in the environment. In order to achieve this, uncomment or add the following lines in your .env file:

                    COMPOSE_FILE=docker-compose/otobo-base.yml:docker-compose/otobo-override-https.yml:docker-compose/otobo-nginx-custom-config.yml
                    NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/config/template-custom

                    I’m trying this setting on my VM…

                    You can see my configuration…

                    I have tryed restart nginx service, but it doesn’t work fine…:-(

                  • #11968
                    bes
                    Teilnehmer

                      Hi Giordiano,

                      one  thing I noticed in your config is that the redirect is set up for a prefix match on ‘/’. It propably should be an exact match as set up by location = / { ... }.

                      Also I’m not sure how the problem manifests itself. Is nginx not starting up? Or is only the redirect not working? Are there error messages in the nginx log. The log can be inspected with docker-compose logs nginx.

                      Best regards,

                      Bernhard

                    • #11969
                      Giordano Torre
                      Teilnehmer

                        Only redirect isn’t working.

                        I have corrected in location.

                        I don’t find docker-compose logs…

                         

                      • #11970
                        bes
                        Teilnehmer

                          Ah, this time you need to run the command on the Docker host, not in the Docker image. Specifically you must run docker-compose logs nginx in the directory otobo-docker. as that command needs the information from the file .env.

                        • #11971
                          Giordano Torre
                          Teilnehmer

                            :-(

                          • #11973
                            bes
                            Teilnehmer

                              Now I’m confused. The service web is obviously running, but nginx isn’t. The .env file with

                              COMPOSE_FILE=docker-compose/otobo-base.yml:docker-compose/otobo-override-https.yml:docker-compose/otobo-nginx-custom-config.yml

                              looks ok too.

                              Do you have other changes that might break things? What does git diff say? What does  docker-compose ps say?

                            • #11977
                              Giordano Torre
                              Teilnehmer

                                I haven’t changed anything….

                                 

                                 

                              • #11978
                                bes
                                Teilnehmer

                                  OK, we are getting closer. The service nginx is not running. This means that access via https://localhost/otobo/index.pl should not work. I just saw that in your first mail you mention http://www.supporto.XXXXX.it. But  because you mentioned nginx I just assumed that you are running with SSL support.

                                  The first question is whether you need, or want, SSL support. Both scenarios are supported.

                                  1. SSL support is wanted: your .env file seems to be strange. Could you run  diff .env .docker_compose_env_https and mask out the sensitive parts?
                                  2. SSL support is not wanted: nginx is not needed at all. Replace ‘otobo/index.pl’ with ‘otobo/customer.pl’ around line 445 in the file /opt/otobo/bin/psgi-bin/otobo.psgi which is available in the container web. As a sanitiy check you can also do a diff .env .docker_compose_env_http

                                  In one of the next releases of OTOBO we plan to make this much more simple. See https://github.com/RotherOSS/otobo/issues/1279.

                                • #11982
                                  Giordano Torre
                                  Teilnehmer

                                    Good Morning Bes,

                                    yes I have two otobo, one is VM localhost for testing other is production version.

                                    In production version we have SSL and I configure it with default https template.

                                  • #11983
                                    bes
                                    Teilnehmer

                                      Hello Giordano,

                                      this clarifies things. As you are not using SSL in your test installation, you are also not using nginx there. Subsequently, any changes to the nginx config won’t have any effect.

                                      It makes perfect sense to test config changes first in the test system. This can be achieved by using nginx in the test system as well. This can be achieved by basing the .env in your test system on .docker_compose_env_https and to activate a custom nginx config. You can choose whether you want to add certificates to your test installation. The alternative would be to change the listen directives in  otobo_nginx.conf.template in order to support only HTTP.

                                      Best regards,

                                      Bernhard

                                       

                                  Ansicht von 15 Antwort-Themen
                                  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.