[NTLUG:Discuss] Apache help

MadHat madhat at unspecific.com
Wed Jan 2 07:37:38 CST 2002


At 04:32 PM 12/31/2001 -0600, Greg Edwards wrote:
>Jack Snodgrass wrote:
> >
> > > I've got 2 problems that I can't seem to get resolved with Apache.
> > >
> > > The first is trying to get named vhosts to work through a NAT setup.
> > >
>
>
> >
> > do you have
> >
> > NameVirtualHost xxx.xxx.xxx.xxx
> > where xxx.xxx.xxx.xxx is your 'real' IP Address
> >
> > and sections like:
> > <VirtualHost xxx.xxx.xxx.xxx>
> > ServerAdmin webmaster at somesite.com
> > lDocumentRoot /some/document/root
> > ServerName              somesite.com
> > ErrorLog                logs/somesite.com-error_log
> > TransferLog             logs/somesite.com-access_log
> > </VirtualHost>
> >
> > the namevirtualhost with the IP Address says that users connecting to that
> > address
> > may be doing a virtutalhost request and the <virtualhost></virtualhost>
> > stuff next
> > maps them to the servername that they are trying to get too.
> >
> > > The second is trying to use a single directory outside of the web space
> > > to access include files for .shtml files.
> > >
>
>
> >
> > #include file can't start with a '/'.
> > #inclide virutal can, but it's located off of your document root.
> >
> > jack
> >
> > > --
>
>
>[vhost]
>
>I've tried with both the internal and external IP declared as
>NameVirtualHost xxx.xxx.xxx.xxx and didn't make any difference.  I
>haven't tried with <VirtualHost xxx.xxx.xxx.xxx> section yet.  Using
><VirtualHost site.domain> with NameVirtualHost xxx.xxx.xxx.xxx was the
>setup I had working internally.

Looks like you are mixing name based and IP based virtual hosting.

you can also use * as a wildcard...

NameVirtualHost *

<VirtualHost *>
ServerName blah.dah.tld
ServerAlias www.blah.dah.tld
DocumentRoot /path/to/files
...
</VirtualHost>

http://httpd.apache.org/docs/vhosts/

>[include]
>
>My understanding was that any directive could use an Alias to access
>another directory outside of the webspace.  Is there a limit to which
>directives can use an Alias?  I'm able to Alias my icons, cgi-bin (of
>course) and even a directory containing my Error pages.


include file includes a *FILE* not a URL.  The Alias directive sets up an 
alias for a URL.  When calling a file, you use
<!--#include file="/absolute/path/to/file"-->
or
<!--#include file="relative/path/to/file"-->
not
<!--#include file="/URL/path/to/file"-->

include virtual is what you want
<!--#include virtual="/URL/path/to/file"-->
http://httpd.apache.org/docs/howto/ssi.html



--
MadHat at unspecific.com





More information about the Discuss mailing list