Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Virtual Hosting Problem

Featured Replies

I have a friend who has a server using UniServer 3.2a.

I am trying to help him set up virtual hosts for subdomains. He has a domain www.theundrground.net which points to his server. This is what I have done in his httpd.conf file..

 

NameVirtualHost *

<VirtualHost *>
ServerName www.theundrground.net
DocumentRoot /www/
</VirtualHost>

<VirtualHost *>
ServerName test2.theundrground.net
DocumentRoot /www/forumz
</VirtualHost>

<VirtualHost *>
ServerName kalpz.theundrground.net
DocumentRoot /www/kalpz
</VirtualHost>

 

When I restart the server and I go to all 3 domains, it comes up with the same page.. either kalpz page from kalpz folder or the root of /www/. I cant get it to separate. Any ideas?

ATOMIC Web Hosting 2007 - 2011

Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail)

E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/

Search the forum... fixed this before... or try checking the UniCenter: http://center.uniformserver.com/virtual_ho...ual_host_1.html. If nothing, come back.

  • Author

Yip, been there done that to no avail.... Im backkkk lol.. Just doesnt wanna work..

ATOMIC Web Hosting 2007 - 2011

Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail)

E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/

  • Author

Yip I have...

 

Should it be using localhost like kalpz.localhost/test.localhost?? If your using domains, then you should use kalpz.theundrground.net right?

 

I have tried every combination..

 

 

<VirtualHost *>

ServerName kalpz.localhost

DocumentRoot /www/kalpz

</VirtualHost>

<VirtualHost *>

ServerName kalpz.theundrground.net

DocumentRoot /www/kalpz

</VirtualHost>

 

the namevirtualhost is uncommented also...

ATOMIC Web Hosting 2007 - 2011

Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail)

E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/

I have had a quick scan of this thread. I cannot see the cause of the problem.

 

Your code is correct:

 

NameVirtualHost *

 

ServerName www.theundrground.net

DocumentRoot /www/

 

ServerName test2.theundrground.net

DocumentRoot /www/forumz

 

ServerName kalpz.theundrground.net

DocumentRoot /www/kalpz

 

I am puzzled by your test results when typing addresses into a browser:

 

http:// www.theundrground.net

http:// test2.theundrground.net

http:// kalpz.theundrground.net

 

You receive a test index page from either folder /www/ or folder /www/kalpz

 

I assume your domain provider has enabled wildcards (CNAME) otherwise you would have received a Server not found error on two of the address.

 

This means that any address containing your domain name *. theundrground.net is reaching your server hence not the problem area.

 

Type any address other than the above three containing your domain name eg fred. theundrground.net Will result in each VirtualHost being checked and of course no match will be found. Apache has no problem with this it will serves pages from the default folder. The default is the first VirtualHost entry hence will server pages from WWW. It appears that only the middle address is not being recognised. That’s what puzzles me and I think it is worth checking to see what is in the hosts file

 

Located in: C:\WINDOWS\system32\drivers\etc\

 

If you find any entries containing your domain name delete them.

 

For example 127.0.0.1 test2.theundrground.net

 

That’s my best shot for now.

  • Author

OK Thanks Ric. I dont know why but I tried it again and now it works... :|

 

So weird..

 

I did looking in the hosts file.. it said 127.0.0.1 localhost and thats all

 

Thanks for your help anyways...

ATOMIC Web Hosting 2007 - 2011

Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail)

E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/

Glad you got it working yes computers are weird sometimes it is best just to restart the machine because you can be chasing a problem that does not exist. It is the interaction of so many parts that when you change one aspect creates the illusion of a problem. Been down this path may times myself.

 

One final point you state:

 

“I did looking in the hosts file.. it said 127.0.0.1 localhost and thats all”

 

That’s what I would expect.

 

:D

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.