Mapping to subdirectory

Discussion in 'Installation/Configuration' started by zenny, Jun 13, 2019.

  1. zenny

    zenny Member

    Hi,

    This is question related to configuring a php app in the subdirectory of a domain without affecting the default document root ispconfig3 created in order to install multiple php apps in the subdirectories of the same domain document root. A case in point is as of below.

    While trying to install an app (https://github.com/Attendize/Attendize) in a sub-directory of a domain (https://domain.name/attendize which is actually located at /var/www/domain.name/web/attendize directory) nginx configuration fails to recognize unless the following non-standard (in reference to ispconfig3 auto configuration script) nginx directives are added as advised at http://www.attendize.com/troubleshooting.html:

    However, pointing document root to the related sub-directory in the nginx config,
    points the attendize installer to the document root of the domain with 404 instead of the sub-directory which was not intended.

    Defining document root to a different folder as above defies the auto-configuration of ISPConfig3, I guess.

    Any inputs appreciated,

    Cheers,
    /z
     
    Last edited: Jun 13, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My understanding is this is done with subdomain for website. There is chapter "4.6.1.2 Subdomain for website" and "4.6.1.3 Subdomain (Vhost)" in ISPConfig 3.1 Manual.
    It states:
     
  3. zenny

    zenny Member

    @Taleman, Thanks for taking time to reply.

    As you pointed out, there is an aliasdomain option, but not recommended by ISPConfig developers for a long time for the external apps like WP, Joomla or Attendize with their own rewrite rules as the rewrite rules of those apps tend to conflict or collide with the default ISPconfig rewrite rules.

    To make things clear, I am not intending to create any subdomains or aliasdomains. What I am trying to do is:
    http://domain.com points to /var/www/domain.com/web (default)
    http://domain.com/attendize points to /var/www/domain.com/web/attendize (as web is the publicly accessible folder)
    http://domain.com/blog points to /var/www/domain.com/web/wordpress
    and so on with nginx without changing the ispconfig code to avoid falling back to defaults after a future upgrade.
     
    Last edited: Jun 13, 2019
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That should work. Does it not work in your setup?
    Is there redirect code in web/.htaccess? Is there already some other redirection going on?
     
  5. zenny

    zenny Member

    Attendize has a 'public' folder which is equivalent to default 'web' folder ISPCOnfig3 creates like a document root, fyi and didn't work as I stated with some redirection code I supplier earlier.
     

Share This Page