concrete5 virtual host in xampp

Permalink
hi master! how can i add virtual host concrete5 in xampp.

i have done this, but not work, its always redirect to localhost/xampp.

httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
   ServerName localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/concrete5.4.1"
   ServerName concrete5.localhost
</VirtualHost>


host(C:\WINDOWS\system32\drivers\etc\hosts)
127.0.0.1       localhost
127.0.0.1       concrete5.localhost

i have restart apache, but still the same.
someone please help me thanks..

fastcrash
 
darryloctober replied on at Permalink Reply
If I understand what you're trying to do, I think you need to edit your httpd.conf file (mine's in, e.g. c:\xampp\apache\conf\httpd.conf) and edit around line 198:

<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Since you have also edited httpd-vhosts.conf and enabled NameVirtualHost *:80 you should be ok to house your website's document root at, say, DocumentRoot "c:/wwwroot/mywebsite", remembering of course not to put a trailing forward slash on this path (as this seems to kill xampp for me anyway) and also to use forward slashes rather than backslashes, as you have done.

You windows hosts file should read then:

127.0.0.1 local.mywebsite.com

And your httpd-vhosts.conf file could therefore have e.g.:

<VirtualHost *:80>
DocumentRoot "c:/wwwroot/mywebsite"
ServerName local.mywebsite.com
</VirtualHost>

Dazza :: S8 Design (dot co dot uk)
fastcrash replied on at Permalink Best Answer Reply
fastcrash
Hi s8design, i m very thank you for your reply. i have follow your step, but still not work. it always redirected to 'http://localhost/xampp/' when i pointer url to 'http://concrete5.localhost/' or 'http://concrete5.localhost'.

this is my code
httpd.conf( C:\xampp\apache\conf\httpd.conf )
#<Directory />
#   Options FollowSymLinks
#   AllowOverride None
#    Order deny,allow
#    Deny from all
#</Directory>
<Directory />
   Options Indexes FollowSymLinks
   AllowOverride All
   Order allow,deny
   Allow from all
</Directory>


httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
   ServerName localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/concrete5.4.1"
   ServerName concrete5.localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/myanothersite"
   ServerName myanothersite.localhost
</VirtualHost>


host
127.0.0.1       localhost
127.0.0.1       concrete5.localhost
127.0.0.1       myanothersite.localhost


is there something i miss..?
i already restart apache.
please help me.
thanks for your time.