You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ~jb~ <do...@imk9.com> on 2002/05/08 17:53:10 UTC
Local Server - Virtual Domains
I built this Mandrake box because i need to learn PHP
and MySQL and Apache and all that good stuff.
When i installed Linux, i called the hostname 'Joe'
rather than 'localhost' because, well, it looks like a
Joe and i fixed the LED display to say Joe.
So anyway i installed Apache, pretty good i'm doing for
my first try, and i can get to intro page by typing
"http://joe" Then, if i want, i can make aliases and
go to e.g. "http://joe/billybob."
What i cannot do is make a virtual server so i can go
to http://billybob. It might be my syntax is wrong, but
i'm just wondering if maybe i'm unclear on the concept
and it doesn't work like this.
Thanks,
~jb~
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Local Server - Virtual Domains
Posted by ~jb~ <do...@imk9.com>.
David Jackson wrote:
> ---------- /etc/hosts --------------------
> .......
> # Note the vhost are listed as aliases for slacker
That works.
THANK YOU!
~jb~
-----Original Message-----
From: David Jackson [mailto:david.j.jackson@pickledbeans.com]
Sent: Wednesday, May 08, 2002 11:30 AM
To: dog@imk9.com
Cc: users@httpd.apache.org
Subject: RE: Local Server - Virtual Domains
JB --
I'm running Apache-2.0.36,PHP4.2.0 and named bases virtual host, on a local
network. I have 2 Vhost setup meatloaf.homelinux.net and
gravy.homelinux.net:
The box itself is called slacker.homelinux.net (Slackware-8.0).
Here is the changes I made to get Vhost working on slacker:
- ------------ /etc/hosts --------------------------------------
127.0.0.1 localhost
192.168.1.1 slacker.homelinux.net meatloaf.homelinux.net slacker
meatloaf
192.168.1.2 dabean.homelinux.net dabean
192.168.1.3 beans.homelinux.net beans
# Note the vhost are listed as aliases for slacker
--------------- httd.conf --------------------------------------
DirectoryIndex index.html index.php
NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost *>
ServerName meatloaf.homelinux.net
DirectoryIndex index.html index.php
DocumentRoot /home/davej/meatloaf
</VirtualHost>
<VirtualHost *>
ServerName gravy.homelinux.net
DocumentRoot /home/davej/gravy
DirectoryIndex index.html
</VirtualHost>
-------------------------- Notes on Mandrake/RedHat -----------
Redhat,Mandrake and Debian use System V startup scripts.
Take a peek at /etc/network files and /etc/hostname.
Note: The extra directory index in vitural host section shouldn't be
required, but then again they might be....long story
Hope this help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Local Server - Virtual Domains
Posted by David Jackson <da...@pickledbeans.com>.
JB --
I'm running Apache-2.0.36,PHP4.2.0 and named bases virtual host, on a local
network. I have 2 Vhost setup meatloaf.homelinux.net and gravy.homelinux.net:
The box itself is called slacker.homelinux.net (Slackware-8.0).
Here is the changes I made to get Vhost working on slacker:
- ------------ /etc/hosts --------------------------------------
127.0.0.1 localhost
192.168.1.1 slacker.homelinux.net meatloaf.homelinux.net slacker meatloaf
192.168.1.2 dabean.homelinux.net dabean
192.168.1.3 beans.homelinux.net beans
# Note the vhost are listed as aliases for slacker
--------------- httd.conf --------------------------------------
DirectoryIndex index.html index.php
NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost *>
ServerName meatloaf.homelinux.net
DirectoryIndex index.html index.php
DocumentRoot /home/davej/meatloaf
</VirtualHost>
<VirtualHost *>
ServerName gravy.homelinux.net
DocumentRoot /home/davej/gravy
DirectoryIndex index.html
</VirtualHost>
-------------------------- Notes on Mandrake/RedHat -----------
Redhat,Mandrake and Debian use System V startup scripts.
Take a peek at /etc/network files and /etc/hostname.
Note: The extra directory index in vitural host section shouldn't be
required, but then again they might be....long story
Hope this help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Local Server - Virtual Domains
Posted by ~jb~ <do...@imk9.com>.
> You still need 127.0.0.1 localhost in your /etc/hosts.
I'll look at it. Should it not also say 192.168.0.6 Joe?
I did not change /etc/hosts, though maybe install did. Also, i'm
browsing from my Windoze box, which is one reason i changed the
hostname on Linux box, because sometimes i have reason to use
'localhost' on Windoze box, and i didn't want confusion.
More clarification:
I completely buggered up my httpd.conf and copied the
original over it. But as i recall things went like this:
- I edited for hostname.
- Verified it worked (http://joe)
- Made aliases, verified they worked, and then commented
them out.
- Made virtual host "billybob" pointing at /webs/billybob.
I could not browse to http://billybob, however if i browsed to
http://joe, i got dumped in the /billybob directory.
Oh, and i restarted server and cleared my cache in between
these steps.
> Next have you read the apache doc related to virutal hosting?
> What typeof
> virtual are you trying todo? namebased, IP address, port?
Oh trust me i read and read. I *hate* asking for help. I
want to do name-based hosting, IOW i want to browse to
http://billybob, on server "Joe," from Windoze box.
~jb~
-----Original Message-----
From: ~jb~ [mailto:dog@imk9.com]
Sent: Wednesday, May 08, 2002 8:53 AM
To: users@httpd.apache.org
Subject: Local Server - Virtual Domains
I built this Mandrake box because i need to learn PHP
and MySQL and Apache and all that good stuff.
When i installed Linux, i called the hostname 'Joe'
rather than 'localhost' because, well, it looks like a
Joe and i fixed the LED display to say Joe.
So anyway i installed Apache, pretty good i'm doing for
my first try, and i can get to intro page by typing
"http://joe" Then, if i want, i can make aliases and
go to e.g. "http://joe/billybob."
What i cannot do is make a virtual server so i can go
to http://billybob. It might be my syntax is wrong, but
i'm just wondering if maybe i'm unclear on the concept
and it doesn't work like this.
Thanks,
~jb~
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
-----Original Message-----
From: David J Jackson [mailto:david.j.jackson@pickledbeans.com]
Sent: Wednesday, May 08, 2002 10:42 AM
To: users@httpd.apache.org
Subject: Re: Local Server - Virtual Domains
JB --
You need to post the changes you mad to you /etc/hosts and http.conf? No
other apache file
needs to be changed. You still need 127.0.0.1 localhost in your
/etc/hosts.
Next have you read the apache doc related to virutal hosting? What typeof
virtual are you trying todo?
namebased, IP address, port?
Did you metioned Apache and PHP versions?
Finaly, If you aleady done so, subsbribe the PHP general list and MySQL
users list.
And of couse make a habit have searching news archives and docs at the
respective sties.
David
>
>
> What i cannot do is make a virtual server so i can go
> to http://billybob. It might be my syntax is wrong, but
> i'm just wondering if maybe i'm unclear on the concept
> and it doesn't work like this.
>
> Thanks,
> ~jb~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
~jb~ wrote:
> I built this Mandrake box because i need to learn PHP
> and MySQL and Apache and all that good stuff.
>
> When i installed Linux, i called the hostname 'Joe'
> rather than 'localhost' because, well, it looks like a
> Joe and i fixed the LED display to say Joe.
>
> So anyway i installed Apache, pretty good i'm doing for
> my first try, and i can get to intro page by typing
> "http://joe" Then, if i want, i can make aliases and
> go to e.g. "http://joe/billybob."
>
> What i cannot do is make a virtual server so i can go
> to http://billybob. It might be my syntax is wrong, but
> i'm just wondering if maybe i'm unclear on the concept
> and it doesn't work like this.
>
> Thanks,
> ~jb~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Local Server - Virtual Domains
Posted by David J Jackson <da...@pickledbeans.com>.
JB --
You need to post the changes you mad to you /etc/hosts and http.conf? No
other apache file
needs to be changed. You still need 127.0.0.1 localhost in your
/etc/hosts.
Next have you read the apache doc related to virutal hosting? What typeof
virtual are you trying todo?
namebased, IP address, port?
Did you metioned Apache and PHP versions?
Finaly, If you aleady done so, subsbribe the PHP general list and MySQL
users list.
And of couse make a habit have searching news archives and docs at the
respective sties.
David
>
>
> What i cannot do is make a virtual server so i can go
> to http://billybob. It might be my syntax is wrong, but
> i'm just wondering if maybe i'm unclear on the concept
> and it doesn't work like this.
>
> Thanks,
> ~jb~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
~jb~ wrote:
> I built this Mandrake box because i need to learn PHP
> and MySQL and Apache and all that good stuff.
>
> When i installed Linux, i called the hostname 'Joe'
> rather than 'localhost' because, well, it looks like a
> Joe and i fixed the LED display to say Joe.
>
> So anyway i installed Apache, pretty good i'm doing for
> my first try, and i can get to intro page by typing
> "http://joe" Then, if i want, i can make aliases and
> go to e.g. "http://joe/billybob."
>
> What i cannot do is make a virtual server so i can go
> to http://billybob. It might be my syntax is wrong, but
> i'm just wondering if maybe i'm unclear on the concept
> and it doesn't work like this.
>
> Thanks,
> ~jb~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org