Tạo Virtual host on window

  1. File httpd.conf:

#============================================
LoadModule php5_module “C:/php-5.6.23-Win32-VC11-x64/php5apache2_4.dll”
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir “C:/php-5.6.23-Win32-VC11-x64”

Include conf/extra/httpd-vhosts.conf

2. File httpd-vhosts.conf: xóa hết nội dung sample của file

<Directory d:/SOFTWARE/PHP/wordpress-4.5.3/wordpress>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<VirtualHost *:80>
ServerAdmin webmaster@mywordpress.com
DocumentRoot “d:/SOFTWARE/PHP/wordpress-4.5.3/wordpress/”
ServerName mywordpress.com
ServerAlias http://www.mywordpress.com
#ErrorLog “logs/mywordpress.com-error.log”
#CustomLog “logs/mywordpress.com-access.log” common
</VirtualHost>

 

3. File host:

127.0.0.1           http://www.mywordpress.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s