[SOLVED] chromium showing webpage of apache default host when virtual host is setup
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.
Nope it isn't doing it. I have a basic vh on apache2 on debian 10 installed and it shows up perfectly on firefox but not on chromium. i have updated /etc/hosts file. any other suggestions.
Are you running Chrome and Firefox on the same 'puter?
Are you running them on the same 'puter as the web server?
What happens when you access from a different 'puter?
I can't see how the web server would be a factor if two different browsers work differently, but have you tried restarting apache?
I'm running chrome and firefox on the same computer
same computer as webserver
don't have access to other computer right now.
i have tried restarting apache and computer
thought it might be some server misconfiguration like
replaced
<VirtualHost *:80>
with
<VirtualHost localhost:80>
even then same effect. I do have separate enabled virtual conf file enabled like below with seperate root folders
<VirtualHost myshop.localhost:80>
funny thing whatever i type like *.localhost/* resolves to localhost/* but shows url as *.localhost on chrome but firefox working perfect.
If you send a request to the web server with an IP address, you will get the first VirtualHost defined.
If you send a request to the web server with a domain name (i.e.; "localhost") that's not defined in a VirtualHost you will probably get the default Apache page (the index.html in /var/www/ -- ?), if it makes it to the web server at all.
What is the ServerName in the first VirtualHost? (You don't need to post that, just put in the address bar of the browser) What happens when you use that?
What do the web server access and error logs tell you about what's happening? Compare the logged entries for each browser.
The problem was i haven't defined ip6 values in etc/hosts. on you advice i checked the access.log and sure enough it was showing ::1 as from ip, so i configured it in my /etc/hosts and chromium is working fine.
wonder why firefox defaults to ip4 and chromium ip6
anyway thanks very much for this information as this solves my problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.