Multiple domains on 1 IP

8 posts / 0 new
Last post
#1 Thu, 10/22/2009 - 09:56
svenx

Multiple domains on 1 IP

Hello,

I have set up Virtualmin GPL on my server, which is in my local home network currently. Whole installation worked flawlessly. I have installed both Webmin amd Virtualmin from deb packages. My question is how can I set up multiple accounts on 1 IP address, like it can set up on cPanel and Directadmin. For example I have noticed that when my website was set up I could access it like this: http:///~username or better exmaple: http://165.64.46.174/~myaccount

How can this set up on Virtualmin?

Thu, 10/22/2009 - 14:05
andreychek

It should be no problem at all to setup as many domains as you want on one IP address -- that's what Virtualmin does by default, and is well-supported by Apache.

If you want multiple accounts to have websites, but they don't have unique domain names, you might consider setting up aliases for them.

For example, if you're domain is example.com, you can setup USERNAME.example.com aliases that point to each users DocumentRoot.

Some additional ideas are mentioned in here:

http://www.virtualmin.com/documentation/id,frequently_asked_questions/#h...

Fri, 10/23/2009 - 04:16 (Reply to #2)
svenx

Hi, again so I did set up few domains in local network, but I cannot access them like this http://192.168.1.10x/~domain What am I doing wrong? I have tried to assign a virtual IP and assign it to some other domain at the same time and I could access it using ip, but I couldn't access using the method /~username at the end :S How do I set this up in LAN?

Fri, 10/23/2009 - 08:59 (Reply to #3)
andreychek

The Apache folks discourage using the 192.168.1.10x/~domain that you're describing.

If you wish to do that anyhow, instructions on how to enable that are in the FAQ I linked above -- you'll need to follow the steps there to enable the Apache module for handling that.

-Eric

Fri, 10/23/2009 - 10:15 (Reply to #4)
svenx

Hello again,

why do they discourage using it, does this have an a major security risk? Is there a way accessing it some other way, if I won't install the module as you suggest?

Sun, 10/25/2009 - 03:59 (Reply to #5)
Joe
Joe's picture

The problems are discussed in the FAQ Eric linked you to, as are several better alternatives. They are mostly related to the lack of suexec support in such a configuration, which means executable scripts can have significant data exposure risks.

I'm not sure what you want us to tell you beyond the documented options (including the one you're specifically asking about).

--

Check out the forum guidelines!

Sat, 10/24/2009 - 05:53
ronald
ronald's picture

you can edit your client hosts file to point a domainname to a server in LAN.
192.168.1.10 mydomain.tld
192.168.1.10 www.mydomain.tld
192.168.1.10 otherdomain.tld
192.168.1.10 www.otherdomain.tld

if you are on a winbox...c:windows/system32/drivers/etc/hosts

Sun, 10/25/2009 - 17:06 (Reply to #7)
svenx

Hello,

this worked perfectly, thanks, now I'll try to figure out the rest.

Topic locked