Re: [OT] Re: Vhosts + mod_perl
--82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 02, 2001 at 04:19:28PM -, Jonathan M. Hollin wrote: > :: Everytime I make a new document root for a different website, say the > :: subdomain loco on trains.ath.cx, do I need to update the DNS? > :: > :: For foo.trains.ath.cx and bar.trains.ath.cx do I need to make new DNS > :: entries for foo and bar subdomains? Surely I don't? Because browsers > :: will ask for it, and get directed to trains.ath.cx, and my apache will > :: take are of the rest from the HTTP 1.1 Host: field? >=20 > If you are adding sub-domains then, of course, you need to update your DN= S. > Without a corresponding DNS entry, how could "foo.trains.ath.cx" ever be > resolved? > Actually, it's possible to create a wildcard domain so that *.trains.ath.cx will resolve identically. =20 If you choose to do this you no longer have to update DNS for new hosts but run the risk of people getting inappropriate errors when using a hostname that shouldn't exist. Instead of getting 'no such host' they'll end up with a valid IP and will hit your web server which then has to decide how to handle it. As an example, your zone file can look just as follows - I've split www and vhosts onto separate IP addresses but this isn't required, as you can mix named and wildcard entries fairly freely. If you use tools such as dnslint you may need to append a comment on the end of your wildcard line to indicate to dnslint that the wildcard is intentional. (header fluff) ;; 'real' host www IN A 123.123.123.1 vhost IN A 123.123.123.2 ftp CNAME www.trains.ath.cx. ;; everything else. * CNAME vhost.trains.ath.cx. (footer fluff) Dave --=20 - Dave Baker : [EMAIL PROTECTED] : [EMAIL PROTECTED] : http://dsb3.com/ - GnuPG: 1024D/D7BCA55D / 09CD D148 57DE 711E 6708 B772 0DD4 51D5 D7BC A55D --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8C5mSDdRR1de8pV0RAuEdAJ0bbe0lT0ydp1dVyMNLOKhTLYiK3QCgtEdx IJx5OkyMuKKWDjOYq4UMKiM= =DBLt -END PGP SIGNATURE- --82I3+IH0IqGh5yIs--
RE: [OT] Re: Vhosts + mod_perl
:: Everytime I make a new document root for a different website, say the :: subdomain loco on trains.ath.cx, do I need to update the DNS? :: :: For foo.trains.ath.cx and bar.trains.ath.cx do I need to make new DNS :: entries for foo and bar subdomains? Surely I don't? Because browsers :: will ask for it, and get directed to trains.ath.cx, and my apache will :: take are of the rest from the HTTP 1.1 Host: field? If you are adding sub-domains then, of course, you need to update your DNS. Without a corresponding DNS entry, how could "foo.trains.ath.cx" ever be resolved? Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/
[OT] Re: Vhosts + mod_perl
Hi Marius, Everytime I make a new document root for a different website, say the subdomain loco on trains.ath.cx, do I need to update the DNS? For foo.trains.ath.cx and bar.trains.ath.cx do I need to make new DNS entries for foo and bar subdomains? Surely I don't? Because browsers will ask for it, and get directed to trains.ath.cx, and my apache will take are of the rest from the HTTP 1.1 Host: field? Thanks :) Cheers, James > On Dec 1 at 01:59, 'James' wrote: > |J|But, with that e.g. that uses an IP address, from day to day I don't > |J|know what my IP address will be, can't I use: > |J|NameVirtualHost fred.trains.ath.cx > |J| > |J|... foo > |J| > > NameVirtualHost * > > ServerName www.foo.com > ... > > > specifying '*' as the argument of NameVirtualHost it's a new feature as of > Apache version 1.3.13. It's quite tricky to use it in complex configuration > (multiple listening ports/ip addresses) but it is really very powerful :) > > cheers. > - -- > Marius Feraru http://altblue.n0i.net/
Re: Vhosts + mod_perl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Dec 1 at 01:59, 'James' wrote: |J|But, with that e.g. that uses an IP address, from day to day I don't |J|know what my IP address will be, can't I use: |J|NameVirtualHost fred.trains.ath.cx |J| |J|... foo |J| NameVirtualHost * ServerName www.foo.com ... specifying '*' as the argument of NameVirtualHost it's a new feature as of Apache version 1.3.13. It's quite tricky to use it in complex configuration (multiple listening ports/ip addresses) but it is really very powerful :) cheers. - -- Marius Feraru http://altblue.n0i.net/ "it's easy to stop using Perl: I do it after every project." -BEGIN PGP SIGNATURE- iD8DBQE8CiPBn0ZKufYp8iURAjw9AJ9MtY3gOtwELcnidr83aQ942a9iDACaA8l9 nwmEW30EE5NMHOfJhvPbe9A= =7rPg -END PGP SIGNATURE-
Re: Vhosts + mod_perl
James <[EMAIL PROTECTED]> writes: > Now, how did I know I was going to get flamed?? :/ > > Anyway thanks for the example. Some manuals are too hard to read, you > have to be a goddamn PhD to read some of them out there to untangle > the mess of cross references and incomplete examples. :/ > > But, with that e.g. that uses an IP address, from day to day I don't > know what my IP address will be, can't I use: > > NameVirtualHost fred.trains.ath.cx > > ... foo > I'm successfully using with my ADSL connection: NameVirtualHost 0.0.0.0 ServerName vhost.something.here ... See you, -- Godoy. <[EMAIL PROTECTED]> Solutions Developer - Conectiva Inc. - http://en.conectiva.com Desenvolvedor de Soluções - Conectiva S.A. - http://www.conectiva.com.br msg23179/pgp0.pgp Description: PGP signature
Re: Vhosts + mod_perl
Take a look here: http://dsb3.com/dave/dynipvhost.html or here: http://orbitstar.linux-site.net/pub/archive/apache-vhosts.html Greetz. maarten.
[OT] Re: Vhosts + mod_perl
> Now, how did I know I was going to get flamed?? :/ > > Anyway thanks for the example. Some manuals are too hard to read, you > have to be a goddamn PhD to read some of them out there to untangle the > mess of cross references and incomplete examples. :/ Some are, but this one isn't. This is also off-topic since these aren't mod_perl questions. > But, with that e.g. that uses an IP address, from day to day I don't > know what my IP address will be, can't I use: > > NameVirtualHost fred.trains.ath.cx > > ... foo > http://httpd.apache.org/docs/vhosts/name-based.html There are also tutorials on this subject linked from here: http://httpd.apache.org/docs/misc/tutorials.html - Perrin
Re: Vhosts + mod_perl
Now, how did I know I was going to get flamed?? :/ Anyway thanks for the example. Some manuals are too hard to read, you have to be a goddamn PhD to read some of them out there to untangle the mess of cross references and incomplete examples. :/ But, with that e.g. that uses an IP address, from day to day I don't know what my IP address will be, can't I use: NameVirtualHost fred.trains.ath.cx ... foo ? Thanks and all. James Stephen Reppucci wrote: > Well, you certainly haven't inconvenience yourself by taking the > time to look at the copious documentation available on this, now > have you? > > That said, here's a snippet of what you want to use: > > NameVirtualHost 192.168.0.10 > > > ServerName www.logsoft.com > ServerAlias logsoft.com > ServerAlias www2.logsoft.com > > DocumentRoot /var/apache/htdocs > > Options +ExecCGI +Indexes > AddHandler cgi-script .cgi > > > > SetHandler perl-script > PerlFreshRestart On > PerlHandler Foo:Bar > PerlSetVar SOME_VAR /usr/local/foo > > > > > hth, > > > On Sat, 1 Dec 2001, James wrote: > > >> Does anyone have a quick example of setting up a vhost with mod_perl >> enabled please? Also an ordinary cgi-bin, with file extensions .pl and >> .cgi enabled? >> >> Also with a vhost, I can name the host anything I like can't I? For >> example, say my domain is localhost.localdomain but I'm using dyndns to >> make it a hostname, say, trains.ath.cx. I can assign fred.trains.ath.cx >> and john.trains.ath.cx with vhosts, the requests will get piped to my >> main machine which is trains, and the vhost section will take care of >> the rest, knowing which document root to use, right? I don't have to >> mess around with DNS or anything do I to make new subdomains? >> >> Is it: >> >> >> Options +Indexes +ExecCGI >> DocumentIndex ??? index.html default.html >> perl-handler # hmm, get mod_perl working in /doc/root/perl >> cgi-bin >> # hmmm, get a cgi-bin happening in /doc/root/cgi-bin >> >> >> Or something like that? >> >> Many Thanks. >> James >>
Re: Vhosts + mod_perl
Well, you certainly haven't inconvenience yourself by taking the time to look at the copious documentation available on this, now have you? That said, here's a snippet of what you want to use: NameVirtualHost 192.168.0.10 ServerName www.logsoft.com ServerAlias logsoft.com ServerAlias www2.logsoft.com DocumentRoot /var/apache/htdocs Options +ExecCGI +Indexes AddHandler cgi-script .cgi SetHandler perl-script PerlFreshRestart On PerlHandler Foo:Bar PerlSetVar SOME_VAR /usr/local/foo hth, On Sat, 1 Dec 2001, James wrote: > Does anyone have a quick example of setting up a vhost with mod_perl > enabled please? Also an ordinary cgi-bin, with file extensions .pl and > .cgi enabled? > > Also with a vhost, I can name the host anything I like can't I? For > example, say my domain is localhost.localdomain but I'm using dyndns to > make it a hostname, say, trains.ath.cx. I can assign fred.trains.ath.cx > and john.trains.ath.cx with vhosts, the requests will get piped to my > main machine which is trains, and the vhost section will take care of > the rest, knowing which document root to use, right? I don't have to > mess around with DNS or anything do I to make new subdomains? > > Is it: > > > Options +Indexes +ExecCGI > DocumentIndex ??? index.html default.html > perl-handler # hmm, get mod_perl working in /doc/root/perl > cgi-bin > # hmmm, get a cgi-bin happening in /doc/root/cgi-bin > > > Or something like that? > > Many Thanks. > James > -- Steve Reppucci [EMAIL PROTECTED] | Logical Choice Software http://logsoft.com/ | =-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-=
Vhosts + mod_perl
Hi, Does anyone have a quick example of setting up a vhost with mod_perl enabled please? Also an ordinary cgi-bin, with file extensions .pl and .cgi enabled? Also with a vhost, I can name the host anything I like can't I? For example, say my domain is localhost.localdomain but I'm using dyndns to make it a hostname, say, trains.ath.cx. I can assign fred.trains.ath.cx and john.trains.ath.cx with vhosts, the requests will get piped to my main machine which is trains, and the vhost section will take care of the rest, knowing which document root to use, right? I don't have to mess around with DNS or anything do I to make new subdomains? Is it: Options +Indexes +ExecCGI DocumentIndex ??? index.html default.html perl-handler # hmm, get mod_perl working in /doc/root/perl cgi-bin # hmmm, get a cgi-bin happening in /doc/root/cgi-bin Or something like that? Many Thanks. James