Jump to content

Cannot Setup New Vhost Site


jingo_man

Recommended Posts

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

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.