Skip to main content

Problem with vhosts include file

Comments

7 comments

  • cPWilliamL
    Hi, Could you verify that the userdata include is enabled? You can open of up '/etc/apache2/conf/httpd.conf' and verify the `Include "/etc/apache2/conf.d/userdata/' statement is not commented out for the desired vhost; the command below should also show which userdata includes are uncommented for each vhost: # awk '/^/{f=0}' /etc/apache2/conf/httpd.conf cptest.tld Include "/etc/apache2/conf.d/userdata/std/2_4/cptest/*.conf" cptest.tld Include "/etc/apache2/conf.d/userdata/std/2_4/cptest/cptest.tld/*.conf"
    Thanks,
    0
  • Troncaa
    Hi, The only include in each vhost is Include "/etc/apache2/conf.d/userdata/*.conf", I dont see any include commented out, running your command also confirm that this is the only include in the vhost. Is this is something missing in my cpanel configuration? shouldn't I have by default the include in vhost file for Include "/etc/apache2/conf.d/userdata/std/2_4/cptest/*.conf" and Include "/etc/apache2/conf.d/userdata/std/2_4/cptest/cptest.tld/*.conf"? Thanks
    0
  • cPWilliamL
    The includes are uncommented dynamically on rebuild of the Apache configuration should the file be present. I just wanted to be sure that includes were properly enabled in the Apache configuration. If you received output from that command for the specified domain, then that should mean it's been properly enabled in Apache configuration. This should work for you. How are you testing? Is the domain behind any CDN or proxy? Are you using any custom Apache templates?
    0
  • Troncaa
    Hi, I have no CDN or proxy, I'm using litespeed server to serve http, but litespeed use the apache config files so it shouldn't matter. As I said only include I have in my vhost is for /etc/apache2/conf.d/userdata/*.conf, do I need to run the rebuild in order to add the new file I added under /etc/apache2/conf.d/userdata/std/2_4/blipblop/litemage.conf? Can I rebuild from WHM or do I need to use the command Line?
    0
  • cPWilliamL
    Any time you create or remove a userdata file, you must rebuild the Apache configuration. I thought from your previous comment that you were implying that the include was present. Please re-read the documentation to gain a better understanding of the includes file path structure: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation When you run that awk command, take the include file that was returned, and 'ls' or 'cat' the include: # awk '/^/{f=0}' /etc/apache2/conf/httpd.conf cptest.tld Include "/etc/apache2/conf.d/userdata/std/2_4/cptest/cptest.tld/*.conf" # ls /etc/apache2/conf.d/userdata/std/2_4/cptest/cptest.tld/*.conf /etc/apache2/conf.d/userdata/std/2_4/cptest/cptest.tld/testing.conf
    If you receive 'No such file or directory', there is an issue; otherwise, if you see your configuration, there is no issue with updating the Apache configuration with the include file. How are you testing this?
    0
  • Troncaa
    It's working now, ran the rebuild and now it's in, Thank you
    0
  • cPWilliamL
    That's great to hear @Troncaa
    0

Please sign in to leave a comment.