Skip to main content

Custom Vhost Question

Comments

6 comments

  • cPanelMichael
    Hello :) Have you tried leaving the "Custom template that will apply to all virtual hosts" in-place and then making the individual VirtualHost change directly in the httpd.conf file? You would then run the Apache distiller to preserve that change. Thank you.
    0
  • edigest
    I did try creating a custom vhost for the domain, but had not tried editing /usr/local/apache/etc/httpd.conf directly. Your solution does work, though. To anyone else for whom this info might help, you will have to redo the changes in httpd.conf whenever you run scripts/rebuildhttpdconf. Other than that, an acceptable solution. Thanks, Michael!
    0
  • cPanelMichael
    [quote="edigest, post: 1577801">To anyone else for whom this info might help, you will have to redo the changes in httpd.conf whenever you run scripts/rebuildhttpdconf. Other than that, an acceptable solution.
    Is this the case even after using the Apache distiller? Thank you.
    0
  • edigest
    [quote="cPanelMichael, post: 1578202">Is this the case even after using the Apache distiller?
    Yes. After making the edit to /usr/local/apache/etc/httpd.conf I made another change to /var/cpanel/templates/apache2/vhost.local (which is where I add custom config that I want to apply to all websites) and then ran /scripts/rebuildhttpdconf to apply that change. The edit to httpd.conf for the special needs domain was lost.
    0
  • cPanelMichael
    Right, rebuilding the Apache configuration file does not distill the changes. You muse use the Apache distiller documented here: [url=https://display/EA/Custom+Directives+Outside+of+a+VirtualHost+Tag#CustomDirectivesOutsideofaVirtualHostTag-Apacheconfigdistiller]Apache Config Distiller Thank you.
    0
  • edigest
    [quote="cPanelMichael, post: 1578291">Right, rebuilding the Apache configuration file does not distill the changes. You muse use the Apache distiller documented here: [url=https://display/EA/Custom+Directives+Outside+of+a+VirtualHost+Tag#CustomDirectivesOutsideofaVirtualHostTag-Apacheconfigdistiller]Apache Config Distiller
    Ah, OK. It looks like you're saying I can use /usr/local/cpanel/bin/apache_conf_distiller --update instead of /scripts/rebuildhttpdconf when I make changes to /var/cpanel/templates/apache2/vhost.local. That did not work for me before but I will give it a try again. Thanks!
    0

Please sign in to leave a comment.