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.

Include Editor

Discussion in 'EasyApache' started by David Green, Jul 20, 2014.

  1. David Green

    David Green Registered

    Joined:
    Jul 20, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I need to edit the httpd.conf file to include this data:

    Code:
    # Standard http port
    NameVirtualHost *:80
    
    <VirtualHost *:80>
    ServerAdmin luser@domain.com
    ServerName domain.com
    
    DocumentRoot /site/
    
    <Directory “/site/captcha”>
    Order deny,allow
    Deny from all
    </Directory>
    
    <Directory “/site/classes”>
    Order deny,allow
    Deny from all
    </Directory>
    
    <Directory “/site/sections”>
    Order deny,allow
    Deny from all
    </Directory>
    
    <Directory “/site/files”>
    Order deny,allow
    Deny from all
    </Directory>
    
    <Files ~ “^\.ht|\.ini|\.inc|\.sql”>
    Order deny,allow
    Deny from all
    </Files>
    
    </VirtualHost>

    When reading the httpd.conf file it specificly states:

    DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.

    I created another .conf file and placed it the directory suggested by the original httpd.conf file.
    However, after doing this easy apache is not able to run. After I remove the include file easy apache functions correctly.
    I would assume it would be better to use the WHM include editor to add the strings to the httpd.conf file, but I am unsure where to add the data so it would be specific to the subdomain that I am testing on.

    Which option should I use:


    Pre Main Include
    Pre Virtual Host Include
    or
    Post Virtual Host Include? :confused:
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    if this is going inside of an existing vhost block, simply uncomment the include line within the vhost in httpd.conf, create the include file, and put the configuration in there. In this specific case, the change will be preserved.
     
  3. David Green

    David Green Registered

    Joined:
    Jul 20, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Sorry, thanks for the advice I'll give it a go shortly as I wrapped up in someting elese right now. Thanks again. :)
     
  4. Shavaun

    Shavaun Well-Known Member

    Joined:
    Aug 15, 2013
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page