LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-20-2011, 01:24 AM   #1
snilloc
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Difference in Apache2 behavior depending on URL.


I've just set up Apache2 on my Ubuntu 11.10 machine. I'm observing a difference with regard to index.php files depending on how I access the server. If I use a URL of
http://192.168.2.5/someFolder/
I am presented with the index page generated by the index.php file I placed in someFolder. If on the other hand I use a URL of
http://localhost/someFolder/
I am prompted with a download dialog. If I proceed with the download I'll obtain a file containing the unprocessed PHP from index.php. Attempting to use the URL
http://localhost/someFolder/index.php
Also results in the download dialog, but with a different default name for the file. Finally, if I copy "index.php" to "toc.php" and use a URL of
http://localhost/someFolder/toc.php
The page displays correctly, just as index.php did when accessed via the IP number. As I was composing this message I came up with one more experiment to try. If I use "127.0.0.1" instead of "localhost" the index file is displayed correctly.

Thanks in advance.
 
  


Reply



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
Sudden behavior change in Device URL of samba for XP printer BVP Linux - Networking 5 11-29-2009 09:25 PM
Fluxbox changes behavior depending upon how X is started dguy Slackware 2 12-21-2007 09:46 AM
Apache2 strange behavior JJX Linux - Server 0 02-10-2007 01:14 PM
XTerm url selection SUSE behavior in Debian subspawn Linux - Software 0 12-20-2005 05:38 AM
PHP Question: how to make include(); depending on URL? linuxfond Programming 7 09-05-2003 09:15 AM

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

All times are GMT -5. The time now is 04:22 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