euglug.org

[작성자:] admin

  • [Eug-lug] apache virtuals



    John SechrestFri Sep 17 17:20:28 PDT 2004

    Rob Hudson <rob at euglug.net> writes:
    
     % This one.  By different web services, you mean different document roots,
     % I assume.
    
     % > Or are you asking
    
     % >     Is there a way to set up DNS such that 
     % >        *.example.com is directed
     % >        to a single host and
     % >        on that host all of the
     % >        host.example.com
     % >        are directed to different web services?       
    
    
     This is possible to do.
    
     a) DNS is able to use wild cards.
    
      You can use a * as the name of the *.example.com
      in DNS. And this will point all those hosts to that IP
    
    http://www.menandmice.com/online_docs_and_faq/glossary/glossarytoc.htm?wildcard.htm
    
    
     b) You want to have multiple hosts definitions. If you look at
        the apache documentation, you will find a good explanation
    
    http://httpd.apache.org/docs/vhosts/mass.html
    
    	
       bascially this example will do what you want:
    
    Simple dynamic virtual hosts using mod_rewrite
    
    This extract from httpd.conf does the same thing as the first example. The first half is very similar to the corresponding part above but with some changes for backward compatibility and to make the mod_rewrite part work properly; the second half configures mod_rewrite to do the actual work.
    
    There are a couple of especially tricky bits: By default, mod_rewrite runs before the other URI translation modules (mod_alias etc.) so if they are used then mod_rewrite must be configured to accommodate them. Also, mome magic must be performed to do a per-dynamic-virtual-host equivalent of ScriptAlias.
    
    # get the server name from the Host: header
    UseCanonicalName Off
    
    # splittable logs
    LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    CustomLog logs/access_log vcommon
    
    <Directory /www/hosts>
        # ExecCGI is needed here because we can't force
        # CGI execution in the way that ScriptAlias does
        Options FollowSymLinks ExecCGI
    </Directory>
    
    # now for the hard bit
    
    RewriteEngine On
    
    # a ServerName derived from a Host: header may be any case at all
    RewriteMap  lowercase  int:tolower
    
    ## deal with normal documents first:
    # allow Alias /icons/ to work - repeat for other aliases
    RewriteCond  %{REQUEST_URI}  !^/icons/
    # allow CGIs to work
    RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
    # do the magic
    RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
    
    ## and now deal with CGIs - we have to force a MIME type
    RewriteCond  %{REQUEST_URI}  ^/cgi-bin/
    RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [T=application/x-httpd-cgi]
    
     
     
    
    
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] apache virtuals



    Rob HudsonFri Sep 17 16:37:54 PDT 2004

    This one.  By different web services, you mean different document roots,
    I assume.
    
    > Or are you asking
    > 
    >     Is there a way to set up DNS such that 
    >        *.example.com is directed
    >        to a single host and
    >        on that host all of the
    >        host.example.com
    >        are directed to different web services?       
    
  • [Eug-lug] apache virtuals



    John SechrestFri Sep 17 16:29:37 PDT 2004

    Rob Hudson <rob at euglug.net> writes:
    
     % Is there a way to set up virtual hosts in Apache without having to
     % manage the DNS for each host to accomplish:
     % 
     %     host1.example.com
     %     host2.example.com
     %     etc.
    
    
    Are you asking:
    
        Is there a way to set up DNS such that 
           *.example.com is directed
           to a single host and
           on that host all of the
           host.example.com
           are directed to the same web service?
    
    Or are you asking
    
        Is there a way to set up DNS such that 
           *.example.com is directed
           to a single host and
           on that host all of the
           host.example.com
           are directed to different web services?       
    
    
    Or are you asking
    
        I have DNS set up for *.example.com
        to point to xyz host, how to I get
        seperate web services for each one without
        having to configure apache for each one.
    
    
    All of these are possible. Which do you want the answer to?
    
    
        
    
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] apache virtuals



    Rob HudsonFri Sep 17 15:50:52 PDT 2004

    Is there a way to set up virtual hosts in Apache without having to
    manage the DNS for each host to accomplish:
    
        host1.example.com
        host2.example.com
        etc.
    
    ?
    
  • [Eug-lug] Thank You For the Mozilla Flash Plugin Info



    nyalFri Sep 17 13:10:00 PDT 2004

    Greetings All,
    
    Just a note to say Thank You for all the great information.  I'm headed out 
    the door on holiday even as I type so when I return I'll put it to good use!  
    Again, Many Thanks!
    
    Nyal R. Cammack
    -- 
    Called up the Bureau of Alcohol, Tobacco, and Firearms regional office
      and asked, "What wine goes best with an M-16?"  The guy who answered did
      his best to be helpful:  "That depends.  What are you smoking?"
    
    
  • [Eug-lug] Dell Service?



    Allen BrownFri Sep 17 11:10:14 PDT 2004

    On Fri, 17 Sep 2004, Jason Van Cleve wrote:
    
    > Quoth Mr O, on Thu, 16 Sep 2004 19:06:40 -0700 (PDT):
    > 
    > > Create the partition on the other drive first. Then "xcopy C:\
    > > D:\ /s/c/h/i" . (Source to destination)
    > 
    > Okay, but sheesh, who'd want to do it that way if dd can do it from
    > Linux?
    > 
    > --Jason
    
    dd
      + easy and probably the fastest copy
      + uses linux
      - cannot change partition size
    xcopy
      + can be used into a different partition size
      - reboot is accompanied by disk check
    
    I can see why you might want to shrink the Windoze partition.
    I did that several times before eliminating the OS from my
    system.  I don't see any reason to grow the partition.
    --
    Allen Brown
      work: Agilent Technologies      non-work: http://www.peak.org/~abrown/
            allen_brown at agilent.com	            abrown at peak.org
      Truth, in matters of religion, is simply the opinion
      that has survived. ---Oscar Wilde
    
    
  • [Eug-lug] Dell Service?



    Bob MillerFri Sep 17 10:47:03 PDT 2004

    Ken Barber wrote:
    
    > On Wednesday 15 September 2004 6:09 pm, Bob Miller wrote:
    > 
    > > No.  dd only works if the new filesystem is exactly the same size as
    > > the old.
    > 
    > Which means that it would always work, since dd always makes the new 
    > filesystem the same size as the old one.
    > 
    > I wonder if you mean that it only works if the new drive is the same size as 
    > the old?  If so, you're wrong.  dd works fine as long as the new drive is 
    > equal to or bigger than the old one.
    
    What I meant is, if the new drive is bigger or has different geometry,
    copying all the partitions (or the whole disk) with dd will waste
    space.  Since Jason bought a 40 GB drive to replace a 30 GB drive, I
    assumed he didn't want to throw the extra 10 GB away.
    
    Here's the long-winded explanation.
    
    The first sector on a disk contains the partition table.  The
    partition table describes the disk's geometry: how many sectors are in
    a track, how many tracks in a cylinder, and how many cylinders on the
    disk.  This is all fictitious -- the "logical" geometry in the
    partition table is unrelated to the disk's physical geometry, except
    that the total number of logical sectors is about the same as the
    physical number of sectors (without exceeding it).
    
    Partitions contain filesystems (among other things).  Each filesystem
    has one or more special sectors called superblocks (that's what Unix
    and Linux call 'em.  Microsoft probably calls them something else.)  A
    superblock describes the geometry of the filesystem: how big it is,
    how big its logical sectors are, where the inodes are and how big they
    are, etc.  (Inodes are data structures that describe individual files
    and directories.)
    
    The dd command makes an exact copy of a sequence of sectors on a disk.
    It doesn't know anything about partition tables, partitions,
    superblocks, inodes, or anything else.
    
    If you copy a partition using dd, the new filesystem will have the
    exact same layout as the old.  If the new partition is smaller, then
    the filesystem will be corrupted.  If the new partition is bigger,
    then the additional space is wasted.  You can fix up a too-small
    filesystem using resize2fs (if it's ext2 or ext3), but the filesystem
    data structures won't be optimized for the new disk size.
    
    If you copy a whole disk using dd, dd will overwrite the destination
    disk's partition table, effectively giving the new disk exactly the
    same size, geometry, and partitioning as the old.  Once again, that
    means any extra space on the new disk is wasted.
    
    I personally always use a new disk as an excuse to refine my
    filesystems' layout and sizing, so I create all-new partitions and
    filesystems and copy files onto them.  Usually, I get a new disk
    because the old one was full, I haven't had one go bad in several
    years (knock wood).
    
    Ken, I know you already know all this.  I didn't explain it all to
    Jason the first time around because he sounded like he just wanted to
    get his laptop working again.
    
    -- 
    Bob Miller                              K<bob>
    kbobsoft software consulting
    http://kbobsoft.com                     kbob at jogger-egg.com
    
  • [Eug-lug] Dell Service?



    Jason Van CleveFri Sep 17 10:07:05 PDT 2004

    Quoth Mr O, on Thu, 16 Sep 2004 19:06:40 -0700 (PDT):
    
    > Create the partition on the other drive first. Then "xcopy C:\
    > D:\ /s/c/h/i" . (Source to destination)
    
    Okay, but sheesh, who'd want to do it that way if dd can do it from
    Linux?
    
    --Jason
    
    --
    Girls are like internet domain names:  the ones I like are already
    taken.  Of course, you can always get one from a strange country. . . .
    
  • [Eug-lug] Programming study group? Anyone interested?



    Rob HudsonFri Sep 17 09:52:17 PDT 2004

    On 20040917.1651, horst said ...
    
    > >Date: Fri, 17 Sep 2004 07:28:12 -0700
    > >From: Rob Hudson <rob at euglug.net>
    > >Subject: Re: [Eug-lug] Programming study group? Anyone interested?
    > >
    > >We've got a Python mailing list.  Should we set up a PHP and Perl list
    > >for those interested as well?
    > >
    > 
    > Or starting out with a generic programming list. Then, if one language 
    > happens to gain enough critical mass, it could be split off. This generic 
    > approach helps gauging the interest in a specific language before getting 
    > formal.
    >  That way list members also get some exposure to languages they wouldn't 
    > have otherwise. And it's a bit of networking: we get to know who does 
    > what.
    > Just a though................. Horst
    
    Good thought.  It could expand beyond "Linux", so announcing to the PC
    group and others might be good too.  C#, PHP, Python, Perl, etc.
    
  • [Eug-lug] Programming study group? Anyone interested?



    horstFri Sep 17 09:51:14 PDT 2004

    > Date: Fri, 17 Sep 2004 07:28:12 -0700
    > From: Rob Hudson <rob at euglug.net>
    > Subject: Re: [Eug-lug] Programming study group? Anyone interested?
    > 
    > We've got a Python mailing list.  Should we set up a PHP and Perl list
    > for those interested as well?
    >
    
    Or starting out with a generic programming list. Then, if one language 
    happens to gain enough critical mass, it could be split off. This generic 
    approach helps gauging the interest in a specific language before getting 
    formal.
      That way list members also get some exposure to languages they wouldn't 
    have otherwise. And it's a bit of networking: we get to know who does 
    what.
    Just a though................. Horst