httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Christensen" <dpchr...@holgerdanske.com>
Subject Re: [users@httpd] Virtual Host directives ignored?
Date Thu, 02 Oct 2003 18:01:50 GMT
users@httpd.apache.org:

Harrell, Roger wrote:
> I am havning some trouble with the VirtualHost directives.

So did I.  Here are the changes that I made to the default httpd.conf
that came with my Apache/1.3.26 (Unix) Debian GNU/Linux:

    root@d3020g:~/d3020g/etc/apache:CVS> cvs diff -r 1.1 -r 1.4 httpd.co
nf
    Index: httpd.conf
    ===================================================================
    RCS file: /cvs/dpchrist/d3020g/etc/apache/httpd.conf,v
    retrieving revision 1.1
    retrieving revision 1.4
    diff -r1.1 -r1.4
    314a315
    > ServerName 192.168.254.2
    378a380,387
    > <Directory /home/dpchrist/public_html/cgi-bin>
    >     Options ExecCGI
    > </Directory>
    >
    > <Directory /home/ramdra3/public_html/cgi-bin>
    >     Options ExecCGI
    > </Directory>
    >
    780a790
    >     AddHandler cgi-script pl
    1000a1011
    > NameVirtualHost *
    1015a1027,1037
    >
    > <VirtualHost *>
    >     DocumentRoot /var/www/
    >     ServerName 192.168.254.2
    > </VirtualHost>
    >
    > <VirtualHost *>
    >     DocumentRoot /home/ramdra3/public_html/
    >     ServerName www.ramdragon.com
    >     ScriptAlias /cgi-bin/ /home/ramdra3/public_html/cgi-bin/
    > </VirtualHost>


The above adds the following to the default configuration:

1.  IP address of my web server in DMZ (does not have FQDN, stops
    warning on Apache start-up).

2.  Per-user cgi-bin directories for users "dpchrist" and "ramdra3"
   (per-user public_html directories already enabled).

3.  Virtual hosting:

    a.  Main server is first and default entry.

    b.  "www.ramdragon.com" is mapped into user "ramdra3" directories.
        (since this URL is a valid FQDN, I change my
        C:\WINNT\system32\drivers\etc\hosts file to point to the DMZ
        server.)


HTH,

David


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message