Howto manually configure CPanel Apache Vhost (EasyApache)

CPanel could do many things to ease the harsh life of admin. Most of the things are visible under Web GUI but it doesn’t suits cases when vhost need special tweak. I was going crazy with the crappy Ruby On Rails wizard provided by CPanel, it’s the worst ever, so I decided to install Passenger for Apache instead. And that means I have to SSH and configure manually my vhost. However I found out that my changes are not retained after I restart CPanel and I quickly found out that you need to invoke few scripts to do the job:

After you make changes to /usr/local/apache/conf/httpd.conf, invoke following command to retain the changes:

/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf
/etc/init.d/httpd restart

And for every vhost site, you could include private configuration files by uncomment the include file

Include "/usr/local/apache/conf/userdata/std/2/username/domain_name/*.conf"

Then make sure you create a file with extension within that path.

After that, make sure you invoke this command

/scripts/ensure_vhost_includes --user=username

This would ensure the vhost include the extra conf files

Advertisements

About Jones Lee

Nothing much about me..

3 responses to “Howto manually configure CPanel Apache Vhost (EasyApache)

  1. dipu

    thanks it helped me..

  2. Hi there,

    How to access /usr/local/apache/conf/httpd.conf from Cpanel? I do not see such a file in my file manager.

    Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: