[users@httpd] problem with apache and php files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having some difficulty getting apache2 configured, and after doing
quite a lot of googling, I'm pretty well stumped as to where to go.

Let me preface this by saying that it's entirely possible I've done
something very, very stupid.

That said:

I recently moved to a new server, and in the process upgraded to
apache 2.0.54, having been running apache 1.3 for quite some time. I
host around 6 or 7 different websites off this setup using vhosts. A
few of these websites use php4.

I seem to have gotten myself into the following situation:

There are three sites:

 1. example.com
 2. www.example.com
 3. test.example.com

The first two are actually the same site. The third is a separate
site. All three have "index.php" in their document root - though not
the same 'index.php'. (1 and 2 share one, 3 has it's own, entirely
other).

PHP works perfectly on test.example.com. It also works perfectly on
www.example.com. However, on example.com, every time I try to load up
the root (ie. http://example.com/), Apache 2 attempts to let me (using
FireFox) download the file, instead of parsing it.

It gets stranger.

If I go to http://example.com/index.php , it works perfectly. Only
when going to the root (http://example.com) do I see this behavior.
Every PHP file on the server works exactly as it should. Only if I
load up the root is there a problem.

Stranger still: if I choose to download the file, the transaction does
not appear in any log files. It's as though it never happened.

Nothing I try gets this to reproduce on www.example.com and
test.example.com. Only on the bare example.com can I get this to
occur.

I've looked through my configs, and nothing jumps out at me. I've even
switched the hosts around. I moved the config for test.example.com
into the config file for example.com - no dice (the error occurred). I
changed the example.com config so that it was now set (via the
ServerName directive) to be test.example.com, and it worked
flawlessly.

In short, no matter which of the three configurations I use, they work
flawlessly if their ServerName is anything other than 'example.com'.
If their ServerName is 'example.com', every single one of them
attempts to have the user download index.php if the user tries to load
'http://example.com/'.

I'm fairly convinced this is not a PHP issue, because as I've said, 2
of the 3 sites work flawlessly - and in fact, all of them work
flawlessly if they are not vhosts for 'example.com'. So, I'm left with
this being an apache configuration issue.

Anyone have any ideas?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux