Strange behavior from apache2 configuration

This is a discussion on Strange behavior from apache2 configuration within the Linux Web Servers forums, part of the Web Server and Related Forums category; I have a really strange situation with apache2 and the way it is running a php file in some circumstances ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-13-2004
Alan Chandler
 
Posts: n/a
Default Strange behavior from apache2 configuration

I have a really strange situation with apache2 and the way it is running a php
file in some circumstances and offering it up to the browser as text in
others. *The file in question is index.php as the key file using the drupal
content management system.

I have authentication set on most directories in my server configuration so
that if I access the web server from outside it requires authentication. *If
it is from a machine running on the local network it doesn't. *The
configuration is thus

Alias /drupal /usr/share/drupal

<Directory /usr/share/drupal/>
* * * * Options +FollowSymLinks
* * * * AllowOverride All
* * * * #
* * * * # Controls who can get stuff from this server.
* * * * #
* * * * AuthType Basic
* * * * AuthName "Chandler Intranet"
* * * * AuthUserFile /etc/apache2/users
* * * * AuthGroupFile /etc/apache2/groups
* * * * Require group family
* * * * Order allow,deny
* * * * Allow from 192.168.0.0/24
* * * * Satisfy any
</Directory>

The .htaccess file has (amongst other things)

DirectoryIndex index.php

in it, and so in fact does the main server configuration.

When I access the web server with the url http://myserver/drupal from a
192.168.0.0/24 address, it works and index.php gets executed as a php script. *

When I access this url from outside I get prompted for a user name and
password which I enter correctly and then find that the text of index.php not
sent as html (at least I am prompted by Internet Explorer to either save
or open the file. *When I choose Wordpad, I have received the text
inside index.php)

Just to convince myself that php can really run, I have another directory
phptest with an index.php file as follows

<?php phpinfo(); ?>

and when I call this up (http://myserver/phptest ) from outside I get a
detailed web page full of php information.

I just cannot think what it could be about my apache configuration that
changes the behavior dependent on the source of the browser.

Anyone any ideas?

Or ... any ideas about I can understand how exactly the apache configuration
file has been parsed so that I can locate the source of my problem.

 


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:50 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0