The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Includes

Discussion in 'General Discussion' started by autoclub, May 13, 2015.

  1. autoclub

    autoclub Registered

    Joined:
    May 13, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi, new to the community

    Hope someone could help me please.

    I have a wordpress installed with wpthree broadcast. On this account i have many addon domains, I used addons so that I can have access to files from other domains within the group without going outside my directory and running in to permission group permission issues.

    For broadcast to work I have to set the DocumentRoot to the wordpress install which works well.

    However, this means that other directories such as /forums/ do not work as it keeps resolving to the DocumentRoot which points to wordpress

    I guess i need to use Apache includes so I need to know how to use the Includes Editor to make an alias for the forums. See below

    DocumentRoot /home/domain/public_html/wordpress/
    Alias /forums /home/domain/public_html/addon-domain/forums/

    Wordpress is in main account and the addon domains all have forums so I need an alis to make sure the forums load as they should.

    How would I do this with Includes, or is their a much better way (without redirection)

    cheers
     
  2. autoclub

    autoclub Registered

    Joined:
    May 13, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    i have created a custom conf file and added it to the include path

    ran the script /scripts/ensure_vhost_includes --all-users

    This then unhashed the include path.

    Saus it built the httpd.conf fine

    But it still does not work

    In my conf file it says

    Alias /forums /home/username/public_html/addon-domain.com/forums/
    Alias /legacy /home/username/public_html/addon-domain.com/legacy/
    Alias /public /home/username/public_html/addon-domain.com/public/
    Alias /images /home/username/public_html/addon-domain.com/images/
    Alias /media /home/username/public_html/sharedresources/media/


    Would this work?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you elaborate on the configuration you are looking for, with specific examples? For instance, do you want /forums to work on all addon domain names and go to the same location?

    Thank you.
     
  4. autoclub

    autoclub Registered

    Joined:
    May 13, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi

    I managed to get this working by using the hashed include in the httpd.conf

    I added my aliases

    Then used /scripts/ensure_vhost_includes --all-users which found the new conf file

    worked a charm.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page