Jump to content


Photo

Cannot Setup New Vhost Site


  • Please log in to reply
2 replies to this topic

#1 jingo_man

jingo_man

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 09 December 2012 - 03:28 PM

I have apache2 installed, with webmin and it is currently running a couple of external domain sites (can't recall how I set these up before)

For a new purpose, I need to setup a new site, and I am following a guide to do so, but the website creation part I expected to be able to do in webmin. However, nothing I try works...

The server is on my home domain, with the servername jingoserver. There is a local DNS domain called "jingo.local".

So far, I have tried:
1. Log into webmin
2. Go to Servers > Apache
3. Click "Create Virtual Host" tab
4. Enter following details
4.1 "Handle Connections" leave set to Any Address
4.2 Set the port to a new unused number, any non-standard web server port.
4.3 Set document root to appropriate directory
4.4 Tried leaving "Server name" as any of the following: blank, jingoserver, jingoserver.jingo.local, sub.jingoserver.jingo.local - NOTHING WORKS!!!!
4.5 "Add virtual server to file", leave at default of "New file under virtual servers directory"
4.6 Tried either to "Apply Changes" and / or "Restart apache"

If I try to browse to the new site, nothing. errors.

tailing the server logs, its not even hitting the /var/log/apache2/error.log.....! exactly the same with the access.log file.


anyone help me please!!!!!

thanks

#2 gizmola

gizmola

    Advanced Member

  • Administrators
  • 4,116 posts
  • LocationLos Angeles, CA USA

Posted 09 December 2012 - 03:44 PM

I'm guessing that webmin creates seperate vhost files for each of these entries, which are then read in. I don't know if webmin does this automatically, but anytime you change sometthing in an apache configuration file, apache has to be restarted for those changes to take effect.

Make sure you restart it manually just to be sure.

With port based vhost, the variation is the port.

With named based vhosts, the variation is the name of the host.

There's very little reason to mix them, so I'm confused about why you would be changing ports. Named based vhosts look at the HTTP header and read the "host" field the browser sends along (part of the HTTP 1.1 specification) and route to a specific vhost based on matching the hostname. Hence whatever your browser sends along is what needs to match your vhost config.

Ultimately, the best way to determine what is going on is to find the vhost file/section that webmin makes, and take a look at it. If you copy it into a replay (and something else I wrote did not help you determine the problem) then we might be able to aid you further.



#3 jingo_man

jingo_man

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 09 December 2012 - 04:29 PM

Thanks gizmola!

Deleted and recreated using "any address", standard port 80, same doc root, and the server name I set to a new subdomain "sub.jingo.local" and created a manual DNS entry for this on the local DNS server to point to the server's IP.

It now seems to be working. Didn't know about that could only pick one or the other with vhosts...

Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com