webroot for a domain inside another website.

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Jan 4, 2021.

  1. pawan

    pawan Member HowtoForge Supporter

    I need to build a domain parking solution for a client, where client will add his/her domain from an application interface I provide.
    while I can add the domain and website using ISPCONFIG API, but this will create a separate webroot outside of the application.
    what I want is like for example the website is pardomain.com and webroot is
    Code:
    /var/www/parkdomain.com/web/
    or
    /var/www/client1/web1/web/
    now when a new domain is added from the application interface for parking - example xyz.com. I want a directory created inside -
    Code:
    /var/www/client1/web1/web/xyz.com
    and apache2 pointing to this folder for xyz.com.
    is it possible? if yes how I can achieve it.
     
    Last edited: Jan 4, 2021
    ahrasis likes this.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What you want may be possible, but I do not know how to do it with ISPConfig API. From ISPConfig Panel it would be done with Aliasdomain for website and point to a subdirectory of the website.
    Is there a reason for such a complicated setup? If client wants to park domain xyz.com, why not just create website xyz.com for that client?
     
    Jesse Norell and ahrasis like this.
  3. pawan

    pawan Member HowtoForge Supporter

    Hi Taleman,
    Reason is, the parked domain will contain ADS, affiliate banners, which will be easier for me to manage the pages if it is inside my main website.
     
    ahrasis likes this.
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Note you must use a vhost alias domain for this. Just create one in the ispconfig interface, then use that as an example of what goes in the various fields when adding via the api.
     
  5. pawan

    pawan Member HowtoForge Supporter

    Hi Jesse,
    I am little confused, as what I know is vhost alias is used to access the same website with a different name, whereas what I want is independent website in the browser, just pointing to the folder inside my main website.
    is it clear, will it work this way?
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    A vhost alias domain is what you need, the behavior you have in mind is for a non-vhost alias domain.
     
  7. pawan

    pawan Member HowtoForge Supporter

    can you kindly explain little more, how I can do that?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    This is explained in ISPConfig 3.1 Manual, chapter 4.6.1.5 Aliasdomain (Vhost).
     
    pawan likes this.
  9. pawan

    pawan Member HowtoForge Supporter

    Thanks Taleman for the pointer that is what exactly I need.
    so this should work using API as well?
     
  10. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, it should.
     
    pawan likes this.

Share This Page