Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    23

    Default Adding an Alias to an account in httpd.conf that will survive a rebuild?

    How can one modify an account in httpd.conf, in a way that will survive a rebuild by cPanel? For instance adding an Alias to an account.

    It might perhaps be done like
    Code:
    <VirtualHost 1.2.3.4:80>
    ServerName domain.com
    ServerAlias www.domain.com
    Include "/usr/local/apache/conf/includes/edit.conf"
    </VirtualHost>
    With edit.conf being
    Code:
    Alias /dir1 /dir2
    However I don't think that would survive a rebuild by cPanel.

  2. #2
    Registered User
    Join Date
    Jan 2007
    Posts
    4

    Default

    What version of cPanel/WHM are you using? For a while now, each vhost has had a note along the lines of:


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/apache_major_version/username/domain/*.conf"

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Default

    Quote Originally Posted by koopsta View Post
    What version of cPanel/WHM are you using? For a while now, each vhost has had a note along the lines of:


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/apache_major_version/username/domain/*.conf"
    Would this override any settings present in httpd.conf - for instance, if there is an open_basedir restriction in place, what would you place in such a file to disable it?

    Also, I have Apache/2.0.63 and cPanel 11.24.5-R38506, but I don't see a userdata folder in my /usr/local/apache/conf directory. There is a /usr/local/apache/conf/sites folder though which contains files of the type domain.com.conf and www.domain.com.conf (both of them for each domain).

  4. #4
    Member
    Join Date
    Nov 2006
    Posts
    23

    Default

    Anyone know about this? It seems not every domain has .conf files in the /usr/local/apache/conf/sites folder, and also if the config differs the httpd.conf value overrides those files anyway.

    I do need to restart cPanel occassionally, and when I do the changes I've manually made to httpd.conf (e.g. adding an Alias or AliasMatch, or commenting out open_basedir restrictions) are undone by the rebuild.

    (the above poster Skywalk was me, had some trouble activating this account for a while)

Similar Threads & Tags
Similar threads

  1. Faulty httpd.conf - can't rebuild with rebuildhttpd.conf
    By movielad in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-21-2011, 12:43 PM
  2. ServerName and ServerAlias values reversed in httpd.conf when adding new account
    By mwmconsulting in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 08-12-2010, 09:35 AM
  3. Alias in httpd.conf
    By asmithjr in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 12-29-2008, 07:58 AM
  4. Need an alias for a server name - httpd.conf
    By dory36 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-31-2007, 05:20 AM
  5. Getting Alias in httpd.conf to work
    By asmithjr in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 11-03-2004, 06:25 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube