Tạo virtual host với Xampp

– Mở file: C:\WINDOWS\system32\drivers\etc\hosts
Thêm vào:  127.0.0.1    local.ttweb.com
– Mở file: E:\xampp\apache\conf\extra\httpd-vhosts.conf
Thêm vào:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot “E:/xampp/htdocs/”
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
ServerAdmin admin@local.ttweb.com
DocumentRoot “E:/ttweb/”
ServerName local.ttweb.com
ErrorLog “logs/local.ttweb.com-error.log”
CustomLog “logs/local.ttweb.com-access.log” combined
</VirtualHost>

– Mở file: E:\xampp\apache\conf\httpd.conf
Thêm vào:

<Directory “E:/ttweb/”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Advertisements