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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 | |
|
|