perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Sharp" <>
Subject RE: Multiple Sites
Date Tue, 04 Dec 2001 05:36:30 GMT
>From the start o' the thread:

> "But if I put in URL/directory and a forward slash/
> eg. http://URL/directory/ then it shows the default.htm page. But I
know my
> customers, and they will not put in the directory forward slash. How
do I
> get around this issue?"

This isn't really a mod_perl issue,  it's common to all of apache.

Even though this isn't in the scope of the list, here's your problem and

When you request a file from the apache web server.  "URL/something"
and something doesn't exist AND a directory exists under the same name,
httpd sends the client a redirect to SERVER_NAME/something/  thus
removing the need for people to type the trailing slash.  (the server
figured out if you need it, and adds it if neccesary, magic eh?)

What you need to do is ensure that the ServerName directive in
httpd.conf is indeed resolvable, because that's what the client's going
to be looking for whenever httpd needs to redirect the client to itself.
Sometimes people use the IP address  (ugy imho),  typically I use the
domainname without the www, just because I hate typing. 

As others have aluded to,  if you're trying to serve multiple domains
(or hostnames) off one IP, you use a system called software virtual
hosting.  HTTP/1.1 Supports the Host: field in the http header to
resolve to the site domain.

Here's the config for the truly lazy  (at least it worked for me)


  ServerAdmin  ....
  DocumentRoot ....
  ServerName  This is the part that's causing the redirect problem above
  ErrorLog ....
  CustomLog ...
  ErrorDocument ...
  ...  Aliases ....
  ...  ProxyPasses ....
  ...  Any other config oddities ...

Of course all of this is in the httpd guide

Search @


> -----Original Message----- 
> > If you only have one IP and want to have many web sites (ie 
> URLs) for 
> > your customers, then why don't you use VirtualHost. Then your 
> > customers can either have
> > 
> > 
> >
> >
> > 
> The originator of this thread didnt exactly say he had 
> control over his 
> DNS.....

View raw message