Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Rep:
apache virtual hosts
I just made a virtual host on my LAN server, it works, but the problem is that it does not only work for the given host, but for the whole server, so basically it just overrides the rest of the settings. The main hostname of the server is borg, and the virtual host is *.ebay.* but even if I access the server with borg, it still goes to the virtual host. Why?!
So I tried to create another virtual host called borg, but it said I can only have one, and the first one takes priority.... that's odd since I thought it was possible to have more then one virtual host... it sort of defeats the purpose if I'm limited to one per server.
Is there a way to get this to work properly? I need to do this in order to block ebay from my network and have it so it says it's down, so I will add ebay in the hosts file on the computer downstairs. But I still need to be able to access the root portion of my server the way it is under the root host. Thanks in advance!
That's the part I modified, so anything with ebay in it should use it, otherwise use the server's root settings (which are working correctly without the virtual host part added.)
I tried putting
another one like this:
<VirtualHost *:80>
DocumentRoot /data/intranet/main/www
ServerName borg
</VirtualHost>
But it says it can't resolve borg. But I figured if it does not comply with the ebay one, it should just use the root settings, no?
Also if you have your main configuration already setup to use port 80, you really don't need to specify the port in your virtual hosts config either, something like this is doable:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.