How to redirect multiple domains to a single domain ?
I would like to know how to setup my server to catch all Name Servers which are pointed to my server. There are around 40-50 domains pointed at my nameserver and I would like to redirect all of them to my primary domain.
Actually the point is... I had a hosting client, who stopped paying me, so I deleted his account but their nameservers at still pointing at my nameservers. I would like to know if there's a way I can get their traffic with out the need of creating accounts for each domain.
-
You can alter the default docroot. To do this: cp /var/cpanel/templates/apache2/main.default /var/cpanel/templates/apache2/main.local
Edit this:# Default vhost for unbound IPs ServerName [% servername %] DocumentRoot [% serverroot %]/htdocs ServerAdmin [% serveradmin %] [%- IF supported.mod_suphp %] suPHP_UserGroup nobody nobody [%- END %] [%- IF supported.mod_userdir && userdirprotect_enabled && defaultvhost.userdirprotect != '-1' %] UserDir disable [%- IF defaultvhost.userdirprotect != '' %] UserDir enabled [% defaultvhost.userdirprotect %] [%- END -%] [%- END %]
You'll want to put the docroot of where your site files are located, and adjust the user/group as needed. Then:/scripts/rebuildhttpdconf service httpd restart0 -
Hello :) You can also edit the default website page via: "WHM Home " Account Functions " Web Template Editor" Thank you. 0
Please sign in to leave a comment.
Comments
2 comments