problem with name based virtual hosts and fre .tk domains
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
problem with name based virtual hosts and fre .tk domains
I need to host 2 sites in a VPS, each of them has its own domain name registered via dot tk. I thought that configuring a name virtual host was trivial, but it doesnt works, the first site is displayed for both names. This is the conf:
if you have stopped apache, then clearly you aren't hosting the site yourself or you haven't actually stopped in the first place. Are there hits in the access_log file? can you access it from the local host machine using curl? Bypass all the public IP stuff by running
Code:
curl -v 127.0.0.1 -H "Host: domain1.tk"
and see what's happening then. And show us if things don't clarify themselves.
Ok, I have found the cause of the misterious ghost page, seems that Firefox is loading from cache even when I explicitly ask to refresh the page several times. But still have the virtual host problem, both names redirect to same site.
I have tried all possible combinations and the result is the same.
Don't make combinations. Use the same *:80 notation as in my example above for both the NameVirtualhost directive and the VirtualHost containers.Also what is the output of:
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 li591-188.members.linode.com (/etc/httpd/conf.d/ssl.conf:74)
*:80 is a NameVirtualHost
default server gitlab.lime-engine.tk (/etc/httpd/conf.d/gitlab.conf:10)
port 80 namevhost gitlab.lime-engine.tk (/etc/httpd/conf.d/gitlab.conf:10)
port 80 namevhost www.lime-engine.tk (/etc/httpd/conf.d/virtual_hosts.conf:6)
port 80 namevhost santiagodecuba.tk (/etc/httpd/conf.d/virtual_hosts.conf:18)
Syntax OK
*:80 is a NameVirtualHost
default server gitlab.lime-engine.tk (/etc/httpd/conf.d/gitlab.conf:10)
port 80 namevhost gitlab.lime-engine.tk (/etc/httpd/conf.d/gitlab.conf:10)
port 80 namevhost www.lime-engine.tk (/etc/httpd/conf.d/virtual_hosts.conf:6)
port 80 namevhost santiagodecuba.tk (/etc/httpd/conf.d/virtual_hosts.conf:18)
You have 3 vhosts with gitlab.lime-engine.tk being the default one. Which vhost(s) is the one you can't see?
Also make sure you've cleaned your browser cache before testing
santiagodecuba.tk shows www.lime-engine.tk. Tested our gitlab domain and it shows an empty page, but I dont know if my friend finished installation of gitlab or not. And yes, I have cleaned cache.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.