This is a discussion on Multiple Webs on one IP [Newbie] within the Apache Web Server forums, part of the Web Server and Related Forums category; I have to admin, that I am hardly an expert in configuring Apache. Nevertheless I would like to have a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have to admin, that I am hardly an expert in configuring Apache.
Nevertheless I would like to have a few (3) independend webadresses on my local computer to be able to work on different webprojects. Since I want to use mod_rewrite in every project it is not usefull to just put every project in a different folder under localhost. Therefor I would rather want to assign 3 different hostnames to 3 different directories, so that I have 3 independend servers running on one IP. This webs shall only be accesible from my own machine. What is necessary to do that ? Matthias Pospiech |
|
|||
|
On 2004-11-02, Matthias Pospiech <matthiasPUNKTpospiech@gmx.de> wrote:
> What is necessary to do that ? Read the documentation related to Virtual Hosts. Davide -- When you need a helpline for breakfast cereals, it's time to start thinking about tearing down civilisation and giving the ants a go. --Chris King |
|
|||
|
Davide Bianchi wrote:
> On 2004-11-02, Matthias Pospiech <matthiasPUNKTpospiech@gmx.de> wrote: > >>What is necessary to do that ? > > > Read the documentation related to Virtual Hosts. > Davide > The original poster said "This webs shall only be accesible from my own machine". Does that fit in well with virtual hosts? I run name-based virtual hosts on an apache server, and it works fine for others on the internet. But when I want to view the sites myself on a *test server* (unconnected to the internet), I can't get to any particular domain, without a lot of messing about. I have 3 computers localhost - A fastish machine where I want to look at the files webserver - actually on the internet, using virtual hosts. webserver2 - configured like 'webserver', but only for test purposes. The only thing I do is edit httpd.conf on 'webserver2' and put whatever domain I want to see as the first virtual host. Then going to http://local-machines-ip will bring up that domain, since apache defaults to showing the first domain if there is no match on the name. If I want to look at another domain, I have to edit httpd.conf again and restart apache. There must be a way around this, but I have never found it. Since my test server is not on the local host, I can't actually go to the top level directory and just look at the files. BTW, the original poster said he wanted 3 independant servers. I'm not sure if he meant 3 physical computers, or 3 copies of the apache server running. But neither are probably necessary. Certainoly once he gets them on the internet there is no need for more than one computer or one copy of apache running. But when they are local, I am almost as confused as the original poster. |
|
|||
|
On 2004-11-03, David Kirkby <nospam@nowhere.com> wrote:
> Davide Bianchi wrote: >> On 2004-11-02, Matthias Pospiech <matthiasPUNKTpospiech@gmx.de> wrote: >> >>>What is necessary to do that ? >> >> >> Read the documentation related to Virtual Hosts. >> Davide >> > The original poster said "This webs shall only be accesible from my own > machine". Does that fit in well with virtual hosts? > > I run name-based virtual hosts on an apache server, and it works fine > for others on the internet. But when I want to view the sites myself on > a *test server* (unconnected to the internet), I can't get to any > particular domain, without a lot of messing about. > > > I have 3 computers > > localhost - A fastish machine where I want to look at the files > webserver - actually on the internet, using virtual hosts. > webserver2 - configured like 'webserver', but only for test purposes. > > The only thing I do is edit httpd.conf on 'webserver2' and put whatever > domain I want to see as the first virtual host. Then going to > http://local-machines-ip will bring up that domain, since apache > defaults to showing the first domain if there is no match on the name. > If I want to look at another domain, I have to edit httpd.conf again and > restart apache. There must be a way around this, but I have never found it. > > Since my test server is not on the local host, I can't actually go to > the top level directory and just look at the files. > > BTW, the original poster said he wanted 3 independant servers. I'm not > sure if he meant 3 physical computers, or 3 copies of the apache server > running. But neither are probably necessary. Certainoly once he gets > them on the internet there is no need for more than one computer or one > copy of apache running. But when they are local, I am almost as confused > as the original poster. > -- Linux: Fast Pane Relief -- From a Slashdot.org post |
|
|||
|
Davide Bianchi wrote:
> On 2004-11-03, David Kirkby <nospam@nowhere.com> wrote: Hi, I'd like to know what you have to say on this matter, but you have replied to my post without adding any content. I assume it was a mistake. Can you please repost. David Kirkby |
|
|||
|
On 2004-11-05, David Kirkby <nospam@nowhere.com> wrote:
> Davide Bianchi wrote: >> On 2004-11-03, David Kirkby <nospam@nowhere.com> wrote: > I'd like to know what you have to say on this matter, but you have Sorry, messed up with the news reader. Yes, it does fit with VirtualHosts, it doesn't matter who is accessing the site and from where. The only thing that matter to have virtual hosts is that the server respond to the IP address and that that IP address respond to multiple names, even if it does so fro one single machine. Davide -- I admit that X is the second worst windowing system in the world, but all the others I've used are tied for first. --Paul Tomblin |