Showing posts with label Wildcard. Show all posts
Showing posts with label Wildcard. Show all posts

how to Enable wildcard subdomains

0 comments
When you install WPMU by default the subdomain option is checked. This is for blogs in the format of username.yourdomain.com.
There are two steps that need to be done to your server in order for this to work.
In Apache, there needs to be a line in the domain’s virtual hosts section as follows:
ServerName yourdomain.com
ServerAlias yourdomain.com *.yourdomain.com
DocumentRoot /your/doc/root/
ServerAdmin webmaster@yourdomain.com
** If you’re running an Nginx server, you’d use:
server {
listen 80;
server_name domain.com *.yourdomain.com;
}
The Server Alias line with the *.yourdomain.com is what controls this. If you do not have access to change this, ask your webhost for support. More and more hosts are enabling this by default.
The second thing that needs to be done is adding the DNS record. Where you add it depends on your domain hosting. Basically, you need to add a line like this:
*. in A YOURIPADDRESS
These wildcards mean that any subdomain request will fall through to the WPMU install, where MU will look up the name in the database. If it finds it, it serves up the blog.
Note: if you choose the subfolder option on installation, you do not have to do either one of these steps.

Installing A Wildcard SSL Certificate

1 comments
A wildcard ssl basically allows you to use unlimited subdomains on a given domain name with one SSL certificate.  A user will need to purchase a wildcard SSL from a vendor that supplies them.

Similar to having multiple certificates installed on a server, each subdomain containing the certificate needs its own IP as well.  Wildcard SSL’s do not work like Wildcard DNS – you really do have to specifically install the certificate on each subdomain. Here are two methods to setting up Wildcard certificates for a domain.

Multiple Accounts

In this scenario, you’d have each subdomain hosted as a separate cPanel account, and each of those cPanel accounts will have its own IP address.

  1. Generate the Certificate Signing Request (CSR) in WHM, using *.domain.com

  2. Read this article to learn how to assign each account its own IP address

  3. When you’re obtained the certificate,go to WHM > Install a SSL Certificate and Setup the Domain and paste in the CRT and CA Bundle for *.domain.com

  4. The fields should auto-populate, in which case you need to make sure the IP is correct, then change the SSL hostname from *.domain.com to the target subdomain

  5. Click install to install the certificate


One Account

This method may be best for users that are not resellers or that are on shared hosting servers, where having multiple cpanel accounts may not be ideal. In this case, you’d have one cPanel account and assign multiple IPs to its subdomains.

  1. Generate the Certificate Signing Request (CSR) in WHM, using *.domain.co

  2. Read this article to learn how to assign dedicated IPs to multiple subdomains on the same account

  3. When you’re obtained the certificate,go to WHM > Install a SSL Certificate and Setup the Domain and paste in the CRT and CA Bundle for *.domain.com

  4. The fields should auto-populate, in which case you need to make sure the IP is correct, then change the SSL hostname from *.domain.com to the target subdomain

  5. Click install to install the certificate

Enable Wildcard for Account

0 comments

Hello Friends,


If you want to access your account with anything.domain.com like abcd.domain.com


first check DNS report for the domain if it resolve from our server then only


1.edit your zone file for the domain in question with *.domain.com A entry


*.domainname.com. 14400 IN A IP address of server


2 .vi /usr/local/apache/conf/httpd.conf


edit your virtual host container for the domain in question to look like this


search for domain.com



ServerAlias domain.com *.domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /home/user/public_html
BytesLog domlogs/domain.com-bytes_log
User user
Group user
ServerName www.domain.com


User user
Group user
CustomLog /usr/local/apache/domlogs/domain.com combined
ScriptAlias /cgi-bin/ /home/user/public_html/cgi-bin/

Then finally restart Apache..