merwinmay Posted March 15, 2008 Share Posted March 15, 2008 I have a problem and can not get it configured. I have searched everywhere and can not find a solution. I appreciate any help. PHP is running fine if I run <?phpinfo();?> in the htdocs directory. But if I try to configure httpd-vhosts.conf and include it in the httpd.conf file it directs it to the correct path but php won't work. I can post my conf files if you want me to but I thought maybe someone would have a idea. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
eddierosenthal Posted March 18, 2008 Share Posted March 18, 2008 if you are setting up a virtual host system to run a local domain and test your php you need to 1) modify your WINDOWS/system32/drivers/etc/hosts file to something like: 127.0.0.1 localhost 127.0.0.1 wtp.com # for browser acces 127.0.0.1 local.jdmovers.com # for browser acces 127.0.0.1 local.aquadine.com #etc etc then in your apache apache/extra/vhosts-conf file - and i am throwing at you my entire vhosts file so subtract out stuff but it shows the patterns.. # # Use name-based virtual hosting. # ##NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # ##<VirtualHost *:80> ## ServerAdmin webmaster@dummy-host.example.com ## DocumentRoot /www/docs/dummy-host.example.com ## ServerName dummy-host.example.com ## ServerAlias www.dummy-host.example.com ## ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log ## CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common ##</VirtualHost> ##<VirtualHost *:80> ## ServerAdmin webmaster@dummy-host2.example.com ## DocumentRoot /www/docs/dummy-host2.example.com ## ServerName dummy-host2.example.com ## ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log ## CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common ##</VirtualHost> NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot C:/xampp/htdocs ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot C:\seophp ServerName seophp.example.com <Directory C:\seophp> Options Indexes FollowSymLinks +Includes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot C:\wtp ServerName wtp.com <Directory C:\wtp> Options Indexes FollowSymLinks +Includes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot C:\jdmovers ServerName local.jdmovers.com <Directory C:\jdmovers> Options Indexes FollowSymLinks +Includes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot D:\aquadine-catalog\catalog ServerName local.aquadine.com <Directory D:\aquadine-catalog\catalog> Options Indexes FollowSymLinks +Includes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> host that help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.