Jump to content
The Uniform Server Community

Can not create virtual host in version 8.8.1


changtraingheo
 Share

Recommended Posts

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 file

127.0.0.1 localhost

127.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

Link to comment
Share on other sites

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 best

Ric :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...