Custom virtualhosts includes for httpd won't take

knipper

Well-Known Member
Sep 4, 2001
107
0
316
Hi All,

I could use some guidance please! I am trying to create a custom virtualhosts entry. I have followed directions in the docs at: http://www.cpanel.net/documentation/easyapache/customdirectives.html

And it wouldn't take. I deleted the files and directories created, and tried again. Still no luck. Here is what I have tried:
Created new directories and file as required - example:
/usr/local/apache/conf/userdata/std/username/subdomain.website.com/customvirtualhost.conf

After the unsuccessful first try I tried additional outputs. When I tried the following: /scripts/ensure_vhost_include_directives I got a "No such file or directory" message.

Anyone supply the proper steps... any special permissions, etc?

Thanks! :D
 

knipper

Well-Known Member
Sep 4, 2001
107
0
316
Well found part of the problem but still won't take...

OK... part of the problem was the includes path in the actual httpd.conf file was incorrect... i needed to add what apache version. i.e. :
/usr/local/apache/conf/userdata/std/2/username/subdomain.website.com/customvirtualhost.conf

I did that... then check the file by running:
/scripts/verify_vhost_includes and checked the optput... got an OK message.

BUT THEN... when i run:
/scripts/ensure_vhost_includes --all-users

I get a message that says:
can not contain <virtualhost> container within a virtualhost!

If I edit the file to remove the <virtualhost> then, it tells me there are not enough arguments to include the file

Any help please, would be appreciated!
 

knipper

Well-Known Member
Sep 4, 2001
107
0
316
OK... Got it.

I had been copying the existing virtualhost entries, then adding what I wanted to add. (i.e. all the entries put in place when you create an account)
Evidently this can not be done. I then tried to just add what I wanted, and it worked.

Something I did notice going through the file, is that files copied from another server do not include all of the things a "clean" account creation include.

Although you can not see in the httpd.conf file what you have added... you can see the the includes file line is uncommented.... calling on the custom file.

Hope this helps someone in the future!