Commit 7c179a3
committed
Fix daemon error log for IP based virtual host with wildcard Listen.
When using daemon mode with a VirtualHost selected by IP address while
the Listen directive used a wildcard, output to wsgi.errors, sys.stdout
and sys.stderr was written to the main server ErrorLog instead of the
ErrorLog of that VirtualHost. To match the request back to a server the
daemon reconstructed the local socket address from the listener socket
bind address, but for a wildcard listener that address is 0.0.0.0 (or
::) and never matched a VirtualHost given a specific IP address, so the
match fell back to the main server.
Reconstruct the local address from the actual local IP the connection
was received on, carried across as SERVER_ADDR, which is what the Apache
child worker uses for the same matching. This is the original problem
reported in issue #307.1 parent ba085e9 commit 7c179a3
2 files changed
Lines changed: 65 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4642 | 4642 | | |
4643 | 4643 | | |
4644 | 4644 | | |
4645 | | - | |
4646 | | - | |
4647 | | - | |
4648 | | - | |
4649 | | - | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
4650 | 4656 | | |
4651 | | - | |
4652 | | - | |
| 4657 | + | |
4653 | 4658 | | |
4654 | | - | |
4655 | | - | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
4656 | 4662 | | |
4657 | | - | |
4658 | | - | |
4659 | | - | |
4660 | | - | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
4661 | 4701 | | |
4662 | 4702 | | |
4663 | 4703 | | |
| |||
0 commit comments