CAll Us: +92-3338901062 Submit Ticket   Login

How to create wildcard Subdomains in Centos Webpanel (CWP)?

Currently, we can’t create wildcard subdomains in Free control Panel Centos Webpanel. Through this tutorial, you will be able to create wildcard subdomain in CWP.

Copy and Paste this code at the end of /usr/local/apache/conf.d/vhosts.conf file through SSH or file manager

# vhost_start *.yourdomain.com
ServerName _wildcard_.yourdomain.com
ServerAlias *.yourdomain.com
ServerAdmin hostinpk@gmail.com
DocumentRoot “/home/yourdoma/public_html”
ErrorLog “/home/yourdoma/public_html/error.log”
ScriptAlias /cgi-bin/ /home/yourdoma/public_html/cgi-bin/
# Custom settings are loaded below this line (if any exist)
# Include “/usr/local/apache/conf/userdata/yourdoma/*.yourdomain.com/*.conf
SuexecUserGroup yourdoma yourdoma
suPHP_UserGroup yourdoma yourdoma
<Directory “/home/yourdoma/public_html”>
AllowOverride All
# vhost_end *.yourdomain.com

Don’t forget to replace yourdomain.com with your own domain name and yourdoma with the user name of the account.

Save the file and start using wildcard subdomains on your account.

About the Author
Muhammad Jamshed
I am Level 3 Linux Server Management specialist having vast experience of managing Linxu servers and Wordpress Webdesigning.

4 thoughts on “How to create wildcard Subdomains in Centos Webpanel (CWP)?

  1. Glory - March 24, 2020 at 1:14 am

    I tried this code, it didn’t work for me. What’s the latest?

    Reply
    • Muhammad Jamshed - March 27, 2020 at 4:53 pm

      You are right. Its not working.

      I will upload the updated code.

      Reply
  2. Glory - March 29, 2020 at 11:52 am

    Alright thanks… But please, how soon will that be?

    Reply
  3. Kyriakos - October 13, 2020 at 5:27 pm

    That did not worked for my CWP also. It is full updated.

    Reply

Leave a Reply