I am using virtualhost in Centos 6.6. This is my conf file:<VirtualHost *:80>    ServerName test.mydomain.ca    ServerAlias test.mydomain.ca    DocumentRoot /var/www/test_mydomain/public_html    <Directory /var/www/test_mydomain/public_html>        allow from all        Options +Indexes    </Directory>    ErrorLog /var/www/test_mydomain/error.log    CustomLog /var/www/test_mydomain/requests.log combined</VirtualHost>and this is my hosts file:IPADDRESS test.mydomain.caI am able to see index of my subdomain in the server. However, when I try this in another computer, I get the error: unable to load. Why?This is the output of apachectl -t -D DUMP_VHOSTS_default_:443          myipaddress (/etc/httpd/conf.d/ssl.conf:74)*:80                   is a NameVirtualHost         default server test.mydomain.ca (/etc/httpd/conf/httpd.conf:993)         port 80 namevhost test.mydomain.ca (/etc/httpd/conf/httpd.conf:993)                 alias test.mydomain.ca
why my subdomain is not accessible from the Internet?
centos;apache virtualhost
Most likely it has to do with DNS.  You said that IPADDRESS test.mydomain.ca is in your hosts file.  Have you also added it to the hosts file of that second computer?  Or have you added it to a public DNS server?If you have done one of those things, and you still can't reach it, there are a couple of things that could cause that:A firewall is blocking the inbound connection.You second computer is not in the same network, and your IP Address is in RFC 1918 address space (e.g: 172.16-31.x.x, 10.x.x.x, 192.168.x.x).  This address space is not route-able over the internet.  I would start there and see what you can find out.  ping and traceroute are your friends here.