Wild Card Domain Redirection

Wild Card Domain Redirection

Target

Setting up wild card to redirect *.yourdomain.com to yourdomain.com i,e. anything.yourdomain.com will be 
redirected to yourdomain.com

First create a .htaccess file in the document root folder of the domain yourdomain.com. so anything.yourdomain.com will be redirected to yourdomain.com and below is the .htaccess file to achieve this condition.

DirectoryIndex index.html
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

Anything that stats with *.domain.com eg: xxx.domain.com xyz.domain.com will be redirected to domain.com

Reference

URL: http://www.webmasterworld.com/forum92/3660.htm
Advertisement

Starting httpd: (98)Address already in use: make sock: could not bind to address 0.0.0.0:443

Starting httpd: (98)Address already in use: make sock: could not bind to address 0.0.0.0:443

When

Restarting httpd service 

Error :

Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs!

Cause :

Simultaneous use of port by other processes in the server

Fix :

Following Steps need to be performed in-order to find its fix

Lets consider the process crond using the port

1. now run the below command

netstat -lnp | grep '0.0.0.0:80'

2. if output is as following

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30982/crond

then stop the process which is using the port (in our case it is “crond”) as below

service crond stop

3. then run following

service httpd restart

this should give as below

Stopping httpd: [FAILED]
Starting httpd: [ OK ]

and later start crond service as following

service crond start

Everything should work fine.

Installing CDP agent (On Client Server)

USING YUM
Login to the data server.
cd /etc/yum.repos.d
vi r1soft.repo

Insert the following text into the file and save the file:
[r1soft]
name=R1Soft Repository Server
baseurl=http://repo.r1soft.com/yum/stable/$basearch/
enabled=0
gpgcheck=0

yum install r1soft-cdp-enterprise-agent –enablerepo=r1soft
OR
yum install serverbackup-enterprise-agent –enablerepo=r1soft

————————————————————————————————

USING RPM
rpm -qa |grep r1soft
wget http://repo.r1soft.com/release/trials/R1Soft-EnterpriseEdition-linux32.zip
wget http://repo.r1soft.com/release/trials/R1Soft-EnterpriseEdition-linux64.zip
unzip R1Soft-EnterpriseEdition-linux64.zip

If it is 64 bit, then
cd rpm-linux64/
rpm -i *.rpm
If it is 32 bit, then
cd rpm-linux32/
rpm -i *.rpm

make sure that port 8443 & 1167 are allowed in the csf.
Configure and Start the CDP Agent Web-based User Interface
Enter the following command to get key from the CDP server.
r1soft-setup –get-key https://IP_of_CDP_server: