changtraingheo Posted March 19, 2013 Report Share 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 Link to comment Share on other sites More sharing options...
Ric Posted March 19, 2013 Report Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.