Forum Moderators: phranque

Message Too Old, No Replies

Browser showing unexpected webpage source code

Noob Question

         

junkets

10:26 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



I am running Apache 2.2 with virtual hosts and all seems to work as it should. However, when I look at the source of the website from a browser it isn't what I expected - I get this instead:

<HTML>
<HEAD>
<TITLE>mywebsite.com</TITLE>
</HEAD>
<FRAMESET ROWS="*,0" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0>
<FRAME SRC="http://###.###.###.###"
</FRAMESET>
</HTML>

Could anyone shed any light on this? I've been reading up on .htaccess and mod_rewrite but, being a noob, am not sure if I'm barking up the wrong tree.

jdMorgan

10:51 pm on Mar 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> when I look at the source of the website from a browser it isn't what I expected - I get this instead

That is indeed the HTML source code of a Web page as would be visible using "View Page Source" in the browser, so I'm afraid that I do not understand your question.

Jim

junkets

12:00 am on Mar 30, 2007 (gmt 0)

10+ Year Member



I'll attempt to clarify...

To me, it seems that perhaps Apache has generated it's own html and is including my webpage in a frameset (the html code in my webpage is entirely different, and no html file with the code shown by the browser exists).

I first noticed this when I wanted to submit the site to Google, and when attempting to verify ownership of my site (using Google Webtools) it became apparent that Google was not seeing the meta tags of my site - rather it was only seeing the page decribed in my previous post.

Obviously, I would like search engines to index my site and not the bizarre frameset page.

I have set the DocumentRoot in httpd.conf to point to the correct folder. I have created a folder in the DocumentRoot folder which contains all the files for my website, and have set appropriate directives in a VirtualHost container to point to that folder.

Is this something to do with how urls are rewriten in order for virtual hosting to work? Or, perhaps I have misunderstood how some of the features work in the <Directory /> containers?

The "default" set:

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

The "DocumentRoot" set:

<Directory "/path/to/my/sites/folder">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

I have not created any .htaccess files nor do there appear to be any. I have used mod_rewrite once which sets a rule for Trace.

Before I go on, am I even on the right track?!

jdMorgan

12:51 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Apache doesn't generate anything: It takes incoming URLs requests and translates them to filepaths, then opens the indicated file, and sends the content back to the requesting client. Apache itself is dirt-simple, which is why an old 100 MHz i80386-based PC still makes a usable Web server for fewer than 100 sites (if they are static).

Complications arise when you consider all the modules bolted on to Apache, and of course, adding scripts such as PERL and PHP complicates it further since those are outside of Apache itself.

If you didn't create that frameset, then some agent did, but not Apache. Could it be that you used a WYSIWYG page editor (FrontPage, DreamWeaver, etc.), or perhaps you're running some kind of CMS or a PHP-driven site?

Because the frame contains your site's title, foul play is less likely but of course, still possible.

This is odd... At first reading, I thought the frame page was (implicitly being acknowledged as) yours, and that you just had a MIME-type or content-encoding problem... It'll be interesting to see what the cause of this is.

Jim

junkets

3:13 am on Mar 30, 2007 (gmt 0)

10+ Year Member



Thanks Jim for your prompt replies. It was my understanding that Apache does not generate anything - I have not been unable to find any documentation related to what I'm experiencing.

In configuring Apache, I've activated the bare minimum of (shared) mods. I went through the documentation for every mod and did my best at ascertaining whether I would be using them or not. Can it be a missing or mis-used mod creating this?

As for my site, it's a simple, static two page site which I've hand-coded (xhtml/css). It includes a form, which requires PHP to be submitted, so I have PHP(5.2.1) compiled/configured on my server. So I don't see the site itself having anything to do with it. Am I overlooking something?

Let me add to the bizarreness: Both pages of my site have links to W3C validators (xhtml 1.0 strict and css). The markup/css validate, and the source code for my site are shown as I'd expect to see them. So, why do my browsers (Safari and Camino) and Google only see the weird/alien/non-existent frameset code (which, btw, seems to be missing a closing '>' )?

You mentioned foul play. With regard to this I don't know what more to say other than all logs (access/error/etc...) appear to be 'normal' (remembering I'm a noob, I could be wrong), showing several Stealth Mode connection attempts and some denied UDP entries (I have been led to believe these are to be expected). Is there anything in particular I should be looking out for?

This is odd indeed...

jdMorgan

3:27 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm at a loss... Only one thing more: Are you using any kind of "Security Suite" on the machine you're using to view this page, and does it have any kind of ad-blocking function? Or could the program you're using to view this file be doing this -- maybe in order to include other stuff within the browser window (such as validation info or reports)?

Sometimes, the "security" programs do funny things like remove all JavaScript calls, replace common-advertisement-sized images with a 1x1 transparent GIF, and all manner of things can make a page behave very strangely.

Also, whose IP address is that in your first post, yours, or someone else's?

Jim

junkets

3:39 am on Mar 30, 2007 (gmt 0)

10+ Year Member



Hey Jim, no security apps running. Yes it' my IP. Just had a thought, maybe I really have been barking up the wrong tree - could it have to do with the domain name - it's parked, and using framed forwarding to my IP address... doh. Looking into that now...

Joe

jdMorgan

4:02 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Bingo!

I eschew any of those "parking and forwarding"-type setups, and didn't even think about that possibility. I hope you'll dump that and get "real DNS" for your server/site -- It'll save you a bunch of mickey-mouse problems.

Jim

junkets

4:09 am on Mar 30, 2007 (gmt 0)

10+ Year Member



Bingo indeed! What a waste of my time, and yours :(

Thanks for the support. Next time-waster: the eschewing of parking and forwarding... Wish me luck!

Thanks again,
Joe