Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
Trying to do this on a Windows 7 64 bit and having big problems getting it to work   
 
Tried an msi installer to begin with but didn't seem to be compatible with windows 7 
 
uninstalled Apache and then installed it following these instructions 
 
http://lifeofageekadmin.com/how-install-apache-2-4-php-5-4-and-mysql-5-5-21-on-windows-7/ 
 
now when i command prompt: 
c:\apache24\bin\httpd -k install 
 
says it is already installed 
 
but now apache wont start at all. any ideas? 
 
[Edited on 10-11-2012 by Tom J]
 | 
Rob_Quads 
Member 
 
Registered: 29th Mar 01
 Location: southampton 
User status: Offline 
 
 | 
 
I found using WAMP much easier on windows that installing everything bit by bit. It installs all the bits you need for you.
 | 
Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
WAMP/XAMP is your best bet as it'll install the whole *AMP stack (apache, mysql, php; also includes PHPMyAdmin/SQLBuddy) and comes with a nice config/menu setup.
 | 
noshua 
Member 
 
Registered: 19th Nov 08
 
User status: Offline 
 
 | 
 
XAMP ftw
 | 
Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
ok i've installed wamp now and been trying to make it so i can create multiple virtual sites.  
 
added this in my C:\windows\system32\drivers\etc   hosts file 
127.0.0.1        client1.localhost 
 
changed 
Listen 80 to  
Listen *:80  
 
added following to httpd.conf file: 
 
# Tells Apache to identify which site by name 
NameVirtualHost *:80 
# Tells Apache to serve the default WAMP Server page to "localhost" 
<VirtualHost 127.0.0.1> 
ServerName localhost 
DocumentRoot "C:/wamp/www" 
</VirtualHost>  
# Tells Apache to serve Client 1's pages to "client1.localhost" 
# Duplicate and modify this block to add another client 
<VirtualHost 127.0.0.1> 
# The name to respond to 
ServerName client1.localhost 
# Folder where the files live 
DocumentRoot "C:/wamp/client1" 
# A few helpful settings... 
<Directory "C:/wamp/client1"> 
allow from all 
order allow,deny 
# Enables .htaccess files for this site 
AllowOverride All 
</Directory> 
# Apache will look for these two files, in this order, if no file is specified in the URL 
DirectoryIndex index.html index.php 
</VirtualHost> 
 
but when i navigate to http://client1.localhost/  
 
i get Forbidden 
 
You don't have permission to access / on this server 
 
think its something to do with order, deny, allow but cant figure it out 
 
[Edited on 10-11-2012 by Tom J]
 | 
Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
http://localhost still works and directs to the wampserver page
 | 
Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
error log  
[Sat Nov 10 17:31:18.600748 2012] [authz_core:error] [pid 756:tid 792] [client 127.0.0.1:51191] AH01630: client denied by server configuration: C:/wamp/client1/ 
[Sat Nov 10 17:31:19.159780 2012] [authz_core:error] [pid 756:tid 792] [client 127.0.0.1:51191] AH01630: client denied by server configuration: C:/wamp/client1/favicon.ico
 | 
Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
Is that your config or did you use the 'Add Virtual host' option on WAMP? But you should use the VirtualHost.conf that is in WAMP rather than http.conf (if you use http.conf then stick it at the bottom). 
 
Try something like -  
code:
  
Listen 80 
NameVirtualHost *:80 
 
<VirtualHost *:80> 
ServerName localhost 
DocumentRoot "C:/wamp/www" 
</VirtualHost> 
 
<VirtualHost *:80> 
ServerName client1.localhost 
DocumentRoot "C:/wamp/client1" 
</VirtualHost> 
  
  
 
Edit - Virtual host conf is '\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf', just uncomment the include in 'http.conf'. 
Also flush your DNS. 
 
[Edited on 10-11-2012 by Dom]
 | 
Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
Actually go with below for your virtual host conf (make sure no other virtual hosts are listed)  -  
code:
  
NameVirtualHost *:80 
 
<VirtualHost *:80> 
    DocumentRoot "C:/wamp/client1" 
    ServerName client1.localhost 
	<Directory "C:/wamp/client1">  
		Options Indexes FollowSymLinks  
		AllowOverride None  
		Order allow,deny  
		Allow from all  
	</Directory>  
</VirtualHost> 
  
  
 
[Edited on 11-11-2012 by Dom]
 | 
Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
this is my virtual host conf do i tag that on the end or replace the whole lot 
 
 
# Virtual Hosts 
# 
# Required modules: mod_log_config 
 
# If you want to maintain multiple domains/hostnames on your 
# machine you can setup VirtualHost containers for them. Most configurations 
# use only name-based virtual hosts so the server doesn't need to worry about 
# IP addresses. This is indicated by the asterisks in the directives below. 
# 
# Please see the documentation at  
# <URL:http://httpd.apache.org/docs/2.4/vhosts/> 
# for further details before you try to setup virtual hosts. 
# 
# You may use the command line option '-S' to verify your virtual host 
# configuration. 
 
# 
# 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 "c:/Apache24/docs/dummy-host.example.com" 
    ServerName dummy-host.example.com 
    ServerAlias www.dummy-host.example.com 
    ErrorLog "logs/dummy-host.example.com-error.log" 
    CustomLog "logs/dummy-host.example.com-access.log" common 
</VirtualHost> 
 
<VirtualHost *:80> 
    ServerAdmin webmaster@dummy-host2.example.com 
    DocumentRoot "c:/Apache24/docs/dummy-host2.example.com" 
    ServerName dummy-host2.example.com 
    ErrorLog "logs/dummy-host2.example.com-error.log" 
    CustomLog "logs/dummy-host2.example.com-access.log" common 
</VirtualHost>
 | 
Dom 
Member 
 
Registered: 13th Sep 03
 
User status: Offline 
 
 | 
 
Remove everything in httpd-vhosts.conf then stick in the new config. Just make sure you uncomment the include within http.conf.
 | 
Tom J 
Organiser: South Wales Premium Member 
 
Registered: 8th Sep 03
 Location: Bridgend 
User status: Offline 
 
 | 
 
did what you said and the whole apache crashed and couldn't restart it and had to reinstall so i've given up on that part for now. 
 
can't even get it working basically with PHP right now as i knocked up a test page with this code on it, and it won't even process that it's just displaying it as the whole code and not processing it 
 
code:
  
< html >  
< head >  
< title > PHP Testing< /title >  
< /head >  
< body > < ?php echo “ < p > If you see this then we did it right! < /p > ”; ? > 
< /body >  
< /html > 
  
  
 
 
if i make a file in php with this though it will bring all the php info up so it must be working 
 
code:
  
<?php  
phpinfo();  
?> 
  
  
 
[Edited on 10-11-2012 by Tom J]
 | 
ed 
Member 
 
Registered: 10th Sep 03
 
User status: Offline 
 
 | 
 
You've got a load of spaces in your first example. Ditch them as the PHP opening tag is <?php and the closing is ?>.
 | 
ed 
Member 
 
Registered: 10th Sep 03
 
User status: Offline 
 
 | 
 
Also, you including inline php in a file with a .html extension? That won't work by default so you need to use the .php extension.
 |