LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-18-2019, 01:19 AM   #1
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Rep: Reputation: Disabled
chromium showing webpage of apache default host when virtual host is setup


I have apache2 webserver setup on buster 10.

i have added 1 virtual host on this server.

firefox is correctly showing the virtual host but chromium is showing the default host on the server when virtual host is accessed.

i have flushed the dns of chromium still no change. firefox accessing the correct virtual host and everything with it is normal.

thanks for looking into the problem.


CMG

Last edited by cmgeo; 07-18-2019 at 01:28 AM.
 
Old 07-18-2019, 06:51 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
i have flushed the dns of chromium still no change. firefox accessing the correct virtual host and everything with it is normal.
I guess you have to delete the browser cache.

Regards
 
Old 07-20-2019, 11:02 AM   #3
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
I am terribly sorry for replying so late. but the problem is same even after clearing chromium browser cache.

I just went full on on firefox and almost forgot about this problem. but when i started to cross test my site, it again frustrated me.

CMG
 
Old 07-20-2019, 03:39 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
A shift+ctrl+R should force a reload of the page from the server.
 
Old 07-22-2019, 11:09 AM   #5
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
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.

thanks

CMG
 
Old 07-22-2019, 04:34 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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?
 
Old 07-24-2019, 10:17 AM   #7
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
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.

cmg
 
Old 07-24-2019, 11:04 AM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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.
 
Old 07-25-2019, 10:28 AM   #9
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thank you very much scasey.

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.

cmg
 
  


Reply

Tags
apache, buster, chromium



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chromium - spurious "Webpage not available" cgr Linux - Software 2 11-10-2017 01:25 AM
LXer: Google Chrome/Chromium crashy Flash problems (and a solution for Chromium in Linux) LXer Syndicated Linux News 0 03-06-2011 03:40 AM
webpage in webpage? kalleanka Programming 6 06-07-2009 04:13 PM
LXer: Running The Chromium Browser On Ubuntu 8.04 With CrossOver Chromium LXer Syndicated Linux News 0 10-09-2008 04:21 PM
Apache virtual host not showing up outside of network CompMaster Linux - Networking 1 05-28-2006 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration