changtraingheo 0 Report post Posted March 19, 2013 i don't know why it's not work, this is my httpd-vhosts.conf file <VirtualHost _default_:80> DocumentRoot D:/UniServer/www ServerName localhost ErrorLog "logs/error.log" CustomLog "logs/access.log" common</VirtualHost> <VirtualHost _default_:80> DocumentRoot D:/UniServer/www/tkp ServerName tkp.com ErrorLog "logs/error.log" CustomLog "logs/access.log" common</VirtualHost> And host file127.0.0.1 localhost127.0.0.1 tkp.com But when i run tkp.com it's display page http://localhost/ not display folder tkp in www folder. Pls help me Quote Share this post Link to post Share on other sites
Ric 0 Report post Posted March 19, 2013 I assume you have manually edited the file!First check you have enabled virtual host in Apache’s configuration file:D:\UniServer\usr\local\apache2\conf\ httpd.conf as shown below: ##====== VIRTUAL HOST =========== #To enable uncomment next line Include conf/extra/httpd-vhosts.conf Now edit vhost configuration file:D:\UniServer\usr\local\apache2\conf\extra\ httpd-vhosts.conf Change your vhost section to: <VirtualHost *:80> DocumentRoot D:/UniServer/www/tkp ServerName tkp.com ErrorLog "logs/error.log" CustomLog "logs/access.log" common </VirtualHost> The problem is with _default_ should be *This change will get your Vhost up and running. Although the above is a solution it is not desirable to create a Vhost in the www folder.Read the docs page D:\UniServer \docs\English\apache_vhosts.html for a detailed description how to create a Vhost in its own dedicated folder. All the bestRic Quote Share this post Link to post Share on other sites