Mapping to subdirectory

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

  1. zenny

    zenny Member


    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 ( in a sub-directory of a domain ( which is actually located at /var/www/ 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

    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,

    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 " Subdomain for website" and " 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: points to /var/www/ (default) points to /var/www/ (as web is the publicly accessible folder) points to /var/www/
    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