Re: newbie -help!: multiple local domains under apache] (again)
| From: | Nick | Date: | Wed, 16 Aug 2000 15:35:24 +0000 |
| Subject: | Re: newbie -help!: multiple local domains under apache] (again) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12033@lists.php.net to get a copy of this message | ||
Kurt Boyer wrote:
> Nick,
>
> Some questions for you:
>
> 1) On the line that says: NameVirtualHost 222.222.222.222:8081 ,
> have you changed the IP address to your server's IP address?
> For example, my IP is actually 205.216.147.36:8081 . The
> 222 stuff is just made up for an example only.
>
> 2) On the lines that say: ServerName badboy.carrierworld.com ,
> have you changed it to reference your actual server name?
> Badboy is just an example. When I log into one of my
> server's, I see the following:
>
> Digital UNIX V4.0F (Rev. 1229); Wed Dec 29 22:14:14 MST 1999
> zapper:/home/dvlp/kboyer>
>
> That tells me that "zapper" is the name of my server.
Aha. I just figured out what i was doing wrong. I actualy only have one
machine, and i was trying to serve the pages i wrote on it back to myself on
that machine for debugging purposes. I have Linux RHat 6.2 and did the
worksattion installation, which means i do not actually have a DNS server set
u[p opn my machine, or an IP address other than what i defined in
"hosts"...... I guess that means that i can't use virtual hosts...(told you i
was a newbie :p)
I could try and install a dns server on my machine to do what i specified
above; do you think it is worth it though ? The thing is i do have quite a
few concurrent sites i would like to test, and to avoid me having to change
the paths i use in my scrtipts each time i changed server (ie when i send the
sites to the internet hosts), i was hoping to use relative paths (instead of
/home/carrierworld/forms/script.php, use just /forms/scripts.php, and set the
server path to be /home/carirerworld/; this is useful bweecause the path to
our site on the internet host is smthing like /home
/WWW8/carrierworld.com/htdocs/, so all the relative paths would be relative
to the root folder of the site, namely /home/WWW8/.carrierowlrd.com/htdocs
for the server and /home/carrierworld/ for me....)
The only way i can think of doing that would be to change the server
directory in httpd.conf each time i want to debug a different website and
restart apache........ surely there must be a better way ?
Nick
> -----Original Message-----
> From: Nick [mailto:n.curry@ucl.ac.uk]
> Sent: Wednesday, August 16, 2000 5:56 AM
> To: Kurt Boyer; php-general@lists.php.net; D. Meehan
> Subject: [PHP] newbie -help!: multiple local domains under apache]
> (again)
>
> > Hi,
> >
> > I posted this earlier but am trying again as got no responses.....
>
> I'm still trying to get virtual hosts to work on my machine, just so i can
> seve up the different websites i design to myself for debugging. Thanks a
> lot for all your past help; unfortunately I still haven't managed to make
> the virtual hosts to work, despite trying all the suggested permutations.
>
> > It's probably because i'm such a newbie I'm missing smthing out thats
> > quite obvious, so in case that's the case i'm posting all the config
> > files i know of in case there could be a mistake in one of them. If
> > there's a config file i should have changed that's not in there, please
> > let me know as i probably don't even know it exists.
>
> I did give the apache instructions quite a good read and followed the
> instructions as far as my understranding permitted, but it still doesn't
> work...... please help !!
>
> Nick
>
> /usr/local/apache/conf/httpd.conf file:
>
> >
> > Main Section:
> >
> > Listen 8081
> > Listen 8082
> > Listen 8083
> > Listen 8084
> > Listen 8085
> > Listen 8086
> >
> > BindAddress *
> >
> > ServerName badboy.carrierworld.com
> >
> > Virtual Hosts Section:
> >
> > NameVirtualHost 222.222.222.222:8081
> >
> > <VirtualHost 222.222.222.222:8081>
> > ServerAdmin webmaster@host.some_domain.com
> > DocumentRoot /home/carrierworld/old_site/htdocs
> > <Directory "/home/carrierworld/old_site/htdocs">
> > Options Indexes FollowSymLinks +Includes
> > AllowOverride None
> > </Directory>
> > ServerName badboy.carrierworld.com
> > ErrorLog logs/carrierworld_old-error_log
> > CustomLog logs/carrierworld_old-access_log common
> > </VirtualHost>
> > #<VirtualHost _default_:*>
> > #</VirtualHost>
> >
> > ****************************************
> > tested permutations (a.o.)
> >
> > commented/ uncommented NameVirtualHosts line
> > tried changing the port number from 8081 to 81; eg 222.222.222.222:80
> > instead of 222.222.222.222:8081
> > changed ServerName to 222.222.222 and to badboy (:p Kurt)
> >
> > ***************************************
> >
>
> >
> > /etc/hosts file
> > 127.0.0.1 localhost.localdomain localhost
> > 0.0.0.0 nick
> > 222.222.222.222 badboy.carrierworld.com badboy
> >
> > /etc/hosts.allow
> > #
> > # hosts.allow This file describes the names of the hosts which are
> > # allowed to use the local INET services, as decided
> > # by the '/usr/sbin/tcpd' server.
> > #
> > ALL: LOCAL
> >
> >
>
> > /etc/hosts.deny
> > #
> > # hosts.deny This file describes the names of the hosts which are
> > # *not* allowed to use the local INET services, as decided
> > # by the '/usr/sbin/tcpd' server.
> > #
> > # The portmap line is redundant, but it is left to remind you that
> > # the new secure portmap uses hosts.deny and hosts.allow. In particular
> >
> > # you should know that NFS uses portmap!
> > ALL: ALL
> >