 |
Apache2Triad Help, Support and Development The apache2triad help , support and development forums
|
| View previous topic :: View next topic |
| Author |
Message |
jhendrix
Joined: 10 Mar 2005
Posts: 4
|
| Posted: Thu Mar 10, 2005 9:46 pm Post subject: Virtual host and php include problem |
|
|
Hi,
I just started with apache2triad and I am very pleased so far. Installation was a breeze and everything works well!
I have a question though. I have setup virtual hosts and that is working fine. However, if I want to to use the PHP functionality include then nothing happens on the added virtual hosts.
Code: <?php
$page = 'http://' . $_SERVER['HTTP_HOST'] . '/magweg.php?p_selected=index';
include $page;
?>
On the server where Apache2Triad is installed, it does work for the localhost.
Could anybody please advice?
Thanks,
Joep
Here is my httpd.conf virtual host setting:
Code: NameVirtualHost 192.168.1.2
<VirtualHost 192.168.1.2>
DocumentRoot "C:/apache2triad/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost 192.168.1.2>
DocumentRoot "C:/Website2"
ServerName website2.local
<Directory "C:/Website2">
Options +Includes
</Directory>
</VirtualHost> |
|
| Back to top |
|
Vlad Alexa Mancini
Joined: 07 Jul 2003
Posts: 1538
|
| Posted: Fri Mar 11, 2005 8:58 am Post subject: |
|
|
apache php configuration is global and aplies to all virtualhost scopes
copy the test.php from the cp to your virtualhost to test php |
|
| Back to top |
|
jhendrix
Joined: 10 Mar 2005
Posts: 4
|
| Posted: Wed Mar 16, 2005 10:29 pm Post subject: Problem solved |
|
|
Hi Mancini,
Thanks for your reply.
The problem was that I forgot te update the hosts file on the server as well.
Joep |
|
| Back to top |
|
| |
|