Freescout installation

Discussion in 'Server Operation' started by RicochetPeter, Oct 4, 2024 at 11:28 AM.

  1. RicochetPeter

    RicochetPeter Member

    Some background data:
    Ubuntu 20.04.6 with Pro, ISPConfig 3.2.11p1, using nginx
    I'd like to get Freescout running, in a subdirectory, but somehow I'm lost with the nginx directives. The domain basically already works, imagine https://my.domain, Freescout should run in https://my.domain/fs/. I put all files in /var/www/clients/client1/web16/web/fs/ (i.e. /var/www/my.domain/web/fs/)

    I tried to follow the installation guide, which also mentions this thread for getting it to work in a subdir. I also found this (slightly confusing) post how to generally get Laravel apps working in ISPConfig, but none of these actually worked.

    Can someone please shed a light on how to do it CORRECTLY? I don't have a problem with placing the files elsewhere on the server if that helps in any way...
     
    Last edited: Oct 4, 2024 at 2:38 PM
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    try
    Code:
    ##subroot public ##
    
    and
    Code:
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    
    you say this in a subdirectory, so how did you create it in ispconfig? do you have a site on mydomain.tld, and you're running this separately to that in /web/fs? if so, i believe the easiest way would be to create it as a subdomain vhost, and access it on eg fs.mydomain.tld
     
    RicochetPeter likes this.
  3. RicochetPeter

    RicochetPeter Member

    Sorry, half of what you say I don't really get.
    Q1)
    Well, I'm on the server, via ssh and I created the directory with "mkdir".... It's a standard site in ISPConfig. The domain could be "mydomain.tld", the path is /var/www/clients/client1/web16/ (and the default stuff therein, like web, error, log etc. Opening "https://mydomain.tld/bla.html" in a browser delivers whatever is in /var/www/clients/client1/web16/web/bla.html
    Q2)
    Site? I mean, there's other content there, so, yes...?

    The idea is to run Freescout in https://mydomain.tld/fs/
    When you copy Freescout installation files, you have a lot of files in /var/www/clients/client1/web16/web/fs/, and one of the directories is "public", i.e. /var/www/clients/client1/web16/web/fs/public. This directory is the one that has the actual "web site" data. That's how those Laravel apps seem to work. No problem on a web server that is "naked", but on ISPConfig, I'm struggling to get this to work.

    So, when you call https://mydomain.tld/fs/, Nginx needs to deliver whatever is in /var/www/clients/client1/web16/web/fs/public , mostly index.php. I tried multiple combinations of the location, alias and root directives as shown in some of the links I posted, but none worked.
     
  4. RicochetPeter

    RicochetPeter Member

    Also, I tried your approach, and what it does, it "redirects" ALL requests to public (/var/www/clients/client1/web16/web/public), even the error pages, which is not what I wanted. I wanted all requests to /fs/ to go to /fs/public/
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    So you installed different software in the subfolder/fs/ than what you have in / (the main website)? This is not a good idea and will, in most cases, cause you issues. If you want to run different software applications on a domain, then you better use subdomains. For example, create a new website fs. your domain.tld and then install the software into the web folder of that new site instead of using a subfolder/fs/.

    And if an application needs a different root like e.g. laravel applications do, then use the subdir method from post #2
     
    RicochetPeter likes this.
  6. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    is there anything on my.domain, outside of freescout, that you want to keep accessible?
    if so, you can't change the docroot setting to /web/fs/public, anything above that location would be inaccessible (well, you could try setting that in the Location / section, but i have no idea if that works just for there or not)
    hence the suggestion to create it as a subdomain vhost in ispconfig, this way, you can still have your site my.domain, at /var/www/clients/client1/web16/web, and you can still install freescout at /var/www/clients/client1/web16/web/fs. but it has it's own vhost configuration, with it's own docroot settings, that don't interfere with the main site at my.domain.
     
    RicochetPeter likes this.
  7. RicochetPeter

    RicochetPeter Member

    Hm, okay, I originally didn't want to use a subdomain, but that works fine, so

    thank you guys!
     

Share This Page