Adding a subdomain

#1
I've tried to add a subdomain with a separate wp installation, but it's not working. I'm running OpenLiteSpeed on AWS EC2. I pointed the subdomain to the same IP as the main one.

I've created a directory for it at /var/www/staging.mydomain.com, and created a copy of the main domain's conf file to the following directory:

/usr/local/lsws/conf/vhosts/staging.mydomain.com/vhconf.conf

I've set up a Vhost and a Listener, but the subdomain just redirects to the main domain.

What am I doing wrong?

Here are some screenshots:

VHOST:

1600763811952.png
1600763829344.png
LISTENERS:
1600763860359.png
1600763875091.png
 

David

Active Member
#2
You set two listeners with the same port 80, this is incorrect.
You may use one listener and map two domains to the same listener.
 
#4
Hi, i am having this problem too

main site is using main domain and already running (with domain.com)
and now i want to add subdomain in vhost (sub.domain.com)

i am using existing listener (added new record in virtual host mappings section and add 'sub.domain.com,www.sub.domain.com' in domains field)

and add new record in virtual host list with value
name : sub
virtual host root : var/www/html/sub
config file : /usr/local/lsws/conf/vhosts/sub/vhconf.conf
document root : var/www/html/sub

any idea whats wrong with my setting?
pls help
thanks
 
#5
Hi, i am having this problem too

main site is using main domain and already running (with domain.com)
and now i want to add subdomain in vhost (sub.domain.com)

i am using existing listener (added new record in virtual host mappings section and add 'sub.domain.com,www.sub.domain.com' in domains field)

and add new record in virtual host list with value
name : sub
virtual host root : var/www/html/sub
config file : /usr/local/lsws/conf/vhosts/sub/vhconf.conf
document root : var/www/html/sub

any idea whats wrong with my setting?
pls help
thanks
i did it
solved
:)
 
Top