Install Cms on domain.tld and forum on forum.domain.tld

Discussion in 'ISPConfig 3 Priority Support' started by ktownmods, Aug 24, 2019.

  1. ktownmods

    ktownmods Member

    Hey,

    i installed an cms on domain.tld and in this domain.tld is a folder named forum, inthere is a forum, and i want to access this folder over forum.domain.tld but dont like that in the browser ulr is domain.tld, i like to have forum.domain.tld

    God damn my english sorry
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The clean way would be to create a website forum.yourdomain.tld and then move the forum code into this new website. This has alos security benefits. But there are other ways as well if you don't want to copy the code into a separate website, you can e.g. use a vhost subdomain for that.
     
  3. ktownmods

    ktownmods Member

    The problem is, that i cant update the forum if it isnt on the main domain
    The cms and the forum is the same software
    can you explain me how to do that with vhost subdomain
    so if i go in my browser on forum.domain.tld that it point on domain.tld/forum but the url in the browser is forum.domain.tld and not domain.tld/forum?

    thx
     
  4. ktownmods

    ktownmods Member

    I do that now, but not work
    Website->Subdomain VHost


    Screenshot_400.png

    But in the /etc/nginx/sites-available/forum.domain.tld.vhost is this


    Code:
    server {
            listen 5.9.xxx.xx:80;
            listen [xxxx:xxx:xxx:542e::2]:80;
            listen x.x.xxx.xx:443 ssl;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            listen [xxxx:4f8:xxx:xxxx::2]:443 ssl;
            ssl_certificate /var/www/clients/client0/web12/ssl/forum.domain.tld-le.crt;
            ssl_certificate_key /var/www/clients/client0/web12/ssl/forum.domain.tld.-le.key;
    
            server_name forum.domain.tld ;
    
            root   /var/www/forum.domain..tld/web/forum;
    but the root is the wrong root
    it want root /var/www/domain.tld/web/forum
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The root is a symlink, so this should point to the right directory already. But it might be that your forum software does not support it to be called trough s subdomain.
     
  6. ktownmods

    ktownmods Member

    Hey, my forum software is suppoprted to be called from a subdomain

    But how to add the domain forum.domain.tld that points to domain.tld/forum without to change the url in browser from forum.domain.tld to domain.tld/forum
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Then it must be working now after you added the vhost subdomain. If it does not work, then your forum does not support it that a subdomain is mapped directly to the forum folder. It might e.g. be that you just need a normal subdomain (not vhost subdomain) and that your forum does the mapping internally or that you need a normal subdomain plus a proxy redirect (see redirect tab of a subdomain (not vhost subdomain).

    So if its not working now, contact the developers of your forum software and ask them for the exact configuration for an nginx server that your forum requires to map a subdomain to the forum folder.
     
  8. ktownmods

    ktownmods Member

    So,

    The software is on domain.tld, and the forum is on domain.tld/forum, and i have now a subdomain added under website add website called forum.domain.tld.

    So the docroot from domain.tld is /var.www/domain.tld/web
    The forum is under /var.www/domain.tld/web/forum
    And the docroot of the domain forum.domain.tld is /var.www/forum.domain.tld/web
    so i cant move the /forum folder to the docroot of forum.domain.tld as it cant autoupdate the software then.
    so i have to know how to redirect the forum.domain.tld to domain.tld/forum without changing the url (forum.domain.tld) in the browser to (domain.tld/forum) i want it to be forum.domain.tld

    My english is so boring, i wish you had priority support on german howtoforge


    Screenshot_401.png
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The paths that you refer to as docroot are symlinks and not folders, so both doc roots you mentioned are actually the same folder, so /var/www/domain.tld/web/forum and /var/www/forum.domain.tld/web is the exact same folder.

    But according to the settings of your forum, you probably do not need any document root mapping or redirection. So do what I suggested above, remove the vhost subdomain and add a normal subdomain without any redirect instead. Be careful and do a backup first, the forum folder might get removed when you remove the vhost subdomain.
     
  10. ktownmods

    ktownmods Member

    So:

    and know if i visit forum.domain.tld it point to domain.tld/forum?

    Screenshot_402.png
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the screen that you posted from woltlab, the mapping is done by woltlab. And if it does not work, contact woltlab support and ask them which exact config they require.
     
  12. ktownmods

    ktownmods Member

    but i understand it corecctly that, if i add over Sites->Subdomain for Website forum.domain.tld
    the folder behind is domain.tld/forum?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    No, that's what we had before and which woltlab was not able to work with according to you. Now we have a subdomain which is mapped to the woltlab root folder and woltlab takes care for the routing. That's the way most cms incl. wordpress, typo3, contao etc do it, so it's quite likely that woltlab works the same. According to the settings that you posted, the mapping is done by woltlab internally. Contact woltlab support and ask them for the exact specifications that they need for the mapping and they can tell you which settings you must enter into your forum config.
     

Share This Page