Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subdomain alias of subdomain

On a Linux Plesk server I want the following:

source-sub.domain.com

Aliases:

alias1.domain.com ->source-sub.domain.com

alias2.domain.com ->source-sub.domain.com

alias3.domain.com ->source-sub.domain.com

So I want several subdomains to point to the source sub domain. How do I do this? Can I make a symlink or something?

like image 657
Richard Avatar asked Oct 19 '10 11:10

Richard


People also ask

What is subdomain alias?

A subdomain is a second website with its own unique content, but there is no new domain name. Instead, you use an existing domain name and change the www to another name. The subdomain name looks like forums.domain.com, help.domain.com, help2.domain.com (assuming you already host domain.com).

Can you have two subdomains in a URL?

A subdomain is an additional part to your main domain name. Subdomains are created to organize and navigate to different sections of your website. You can create multiple subdomains or child domains on your main domain.

How do I create a subdomain in a subdomain?

Creating sub-subdomain To create a sub-subdomain, fill up the same form, enter the name you want to use, in this example we will be using sub2. Now on the dropdown menu, select the subdomain you have created earlier, sub1.yourdomain.com. After selection, click on 'Create' button and that's all.

Can a subdomain be spoofed?

If one of the bank's subdomains is vulnerable to subdomain takeover, an attacker can create an HTML form which mimics the login form to the bank's internet banking system. Then, an attacker can run spear phishing or mass phishing campaign asking users to log in to and change their passwords.


1 Answers

Just bumped into this myself.

Create a file vhost.conf in the subdomain conf folder:

/var/www/vhosts/domain.com/subdomains/source-sub/conf/vhost.conf

# add aliases to that file
ServerAlias  alias1.domain.com
ServerAlias  alias2.domain.com
ServerAlias  alias3.domain.com

# reconfigure PSA's httpdmng
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain example.com
like image 112
Philip Avatar answered Oct 12 '22 07:10

Philip