How to set up new virtual host records
Hi Guys,
Ok.
I am embarassed because I did this before, 18 months ago, and can't remember how I did it or find the documentation to do it again.
I have a centos VPS server running WHM/Cpanel and I run about 20 sites on it.
eg example.com and example2.com just as 2.
I have created 2 more sites I want to get running but I can not for the life of me remember how I connected them to the virtual host file which is generated.
When I go in to the virtual hosts file I get this sort of thing.
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
I can see the entry for example.com as below.
Could any of you young whipper snappers help out a forgetful old man and tell me where the hell the option is to add new virtual directories so that I can get more sites set up on my VPS?
And thanks for being tolerant of those of us who have poorer memories than you young guys... ;-)
Best Regards
Peter
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/example/public_html
ServerAdmin webmaster@example.com
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/example.com combined
CustomLog /usr/local/apache/domlogs/example.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User example # Needed for Cpanel::ApacheConf
UserDir enabled example
# Enable backwards compatible Server Side Include expression parser for Apache versions >= 2.4.
# To selectively use the newer Apache 2.4 expression parser, disable SSILegacyExprParser in
# the user's .htaccess file. For more information, please read:
# mod_include - Apache HTTP Server Version 2.4
SSILegacyExprParser On
suPHP_UserGroup example example
SuexecUserGroup example example
RMode config
RUidGid example example
# For more information on MPM ITK, please read:
# apache2-mpm-itk
AssignUserID example example
ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2_4/example/example.com/*.conf"
-
I would suggest logging in to WHM's configuration panel and add it from there. Normally a domain can be added to an already existing user account or to a new one. 0 -
I would suggest logging in to WHM's configuration panel and add it from there. Normally a domain can be added to an already existing user account or to a new one.
Hi Ronaldst, that is my problem. I have gone through every option I can find from WHM menu panel and I can't find the spot to add the web sites to the virtual directory. I know it must be here somewhere because I did it 18 months ago. I don't know if the option has moved or been obscured somehow. But I can't find it again. I have tried going to the control panel of the two new accounts/sites I want to add and I can't find an option to add them through the menus there either. I am guessing that people who do this regularly will know where the option is. I can't even find it in the documentation because I have searched. I also asked my ISP with no luck...so this is why I am asking here. :-)0 -
Hello, You can add new domain names as new accounts from Web Host Manager using the create a new account feature: Create a New Account - Documentation - cPanel Documentation If you want to add a domain name as an Addon domain name to an existing account, you can use the Addon Domains feature in cPanel: Addon Domains - Documentation - cPanel Documentation If you do not see these options, then you may want to consult with your web hosting provider to inquiry why the features were removed from your reseller account. Thanks! 0
Please sign in to leave a comment.
Comments
3 comments