my website is named www.example.com. I have setup A record for this server in DNS record.
the default document root is /var/www/html
I also setup 2 CNAME record in my DNS
111.example.com
222.example.com
What i wanted to do is when someone refer to [
111.example.com...] i want to bring them to document rot /var/www/html/111
when someone refer to [
222.example.com...] i want to bring them to document root /var/www/html/222
this is my virtualhost record in httpd.conf
<VirtualHost *:80>
ServerName 111.example.com
DocumentRoot "/var/www/html/111"
</VirtualHost>
<VirtualHost *:80>
ServerName 222.tryaws.com
DocumentRoot "/var/www/html/222"
</VirtualHost>
Now, no matter the incoming URL is www/111/222.example.com, they all are pointed to /var/www/html/111 as the document root...
can someone please give me a helping hand?