Document Root

Discussion in 'Installation/Configuration' started by jonathannet, Oct 13, 2017.

  1. jonathannet

    jonathannet Member

    Hi and thanks for a nice free hosting panel :)
    I have a question about Document Root, then I goto my webside, it shows like this:

    Code:
    /var/www/clients/client2/[website_domain]
    why can I not use webside name there?
    I have this in my Website path:

    Code:
    /var/www/clients/client[client_id]/[website_domain]
    I running Ubuntu with ISPConfig Version: 3.1.7p1

    Kind regards
    Jonathan
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Because your whole website setup would break as soon as you change the domain name of a website then. That's why ISPConfig is not using domain names in real paths, instead, it creates symlinks with the domain name. so on the shell, you simply use:

    cd /var/www/yourdomain.tlf

    to access the site, no need to remember the internal web and client ID's. To fix your setup, change the path back to it's original value.
     
  3. jonathannet

    jonathannet Member

    Okay I have used sentora before, and the path was like /var/sentora/hostdata/user/public_html/mydomain_dk can I do that with a _ in domain name? instead of the . ? so it not break
     
  4. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    depending on what features you're planning to use, changing the document_root to sth other than starting with /var/www will break some things aswell, like cgi-bin and probably some other stuff .... what you might be able to do is move the content from
    /var/sentora/hostdata/user/public_html/mydomain_dk to /var/www/mydomain.dk/web/ and create a symlink back

    if you're using php don't forget to adjust the paths for open_basedir if you can't change the pathnames in the scripts for some reason.

    It's an ugly hack, it should work by just moving/changing pathnames, do you plan to use sentora and ispconfig on the same server?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not use domain names at all in the website real path. The dot is not the problem here. Change the path back to:

    /var/www/clients/client[client_id]/web[website_id]
     
  6. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    uhm yeah, for the vhost config, that's right, using domain names is giving issues - I just had a discussion about that originating from a framework setup issue heh, how could I forget that.
    I was just talking about the scripts themselves for example <?php include('stuff'); ?>
     
  7. jonathannet

    jonathannet Member

    Okay :) I just have anther question about then I have some domains or subdomains, is it posibble to set it to the same directory as the showing on the picture here? as it was posibble in the Sentora panel ?
     
    Last edited: Oct 13, 2017
  8. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Yes, create a domain alias.
     
    jonathannet likes this.
  9. jonathannet

    jonathannet Member

    Okay thanks for your help :)
     
  10. jonathannet

    jonathannet Member

    Okay I dont that now but then I visit the domain alias, I get this error:
    [authz_core:error] [pid 22474] [client :56406] AH01630: client denied by server configuration: /var/www/clients/client2/web7/favicon.ico, referer: http://fitnessm8.dk/
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The path /var/www/clients/client2/web7/ is not the html document root of an ISPConfig site, the html document root ends alway in a folder with the name 'web', so you probably still have problems from the path changes that you made at the beginning of this thread. Change all the paths back to their original values under System > server config > web. Then you have to delete all sites in ispconfig that you created with the wrong path settings before, Now recreate the site and add the alias domain.
     
  12. jonathannet

    jonathannet Member

    Okay till

    You posted this:
    /var/www/clients/client[client_id]/web[website_id]
    and I changed it to this, so is that not corrent? and how do I change it back to standard again?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    This is correct and the standard, the folder 'web' is added automatically at the end of that path. But maybe you altered other path settungs as well or you did not remove all sites that you created before.
     
  14. jonathannet

    jonathannet Member

    Okay I have set it to standard path now and deleted the domain and added it again both for the main domain and the alias domain, but still the same error then I test it on the .dk domain, but works fine on the .net domain:

    Code:
    [Sun Oct 15 15:42:31.454545 2017] [authz_core:error] [pid 28972] [client 192.168.1.1:56950] AH01630: client denied by server configuration: /var/www/clients/client2/web10/
    [Sun Oct 15 15:42:31.606949 2017] [authz_core:error] [pid 28972] [client 192.168.1.1:56950] AH01630: client denied by server configuration: /var/www/clients/client2/web10/favicon.ico, referer: http://fitnessm8.dk/
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    the .dk domain s the alias domain or the main domain? did you add the alias domain as 'alias domain' or as 'alias domain (vhost)' in ISPConfig?
     
  16. jonathannet

    jonathannet Member

    My main is the .net domain and the aliases is the .net

    [​IMG]
    [​IMG]
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    This looks fine so far. may you please post the vhost file of the website, it should be in /etc/apache2/sites-available/ folder.
     
  18. jonathannet

    jonathannet Member

    Yeah it is here :)
     

    Attached Files:

  19. till

    till Super Moderator Staff Member ISPConfig Developer

    The vhost looks fine so far. please run the command:

    ls -la /var/www/ | grep fitnessm8

    and post the output.
     
  20. jonathannet

    jonathannet Member

    lrwxrwxrwx 1 root root 31 Oct 15 15:41 fitnessm8.net -> /var/www/clients/client2/web10/
     

Share This Page