httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denise Mangano <Deni...@complusdata.com>
Subject RE: [users@httpd] Multiple httpd conf files? (New to list)
Date Tue, 15 Apr 2003 02:47:54 GMT
Jeff,

Thanks for responding.  I actually didn't even think to place it outside the
vhost container.  The only concern there is that my website will have a
number of subdirectories - possibly over 100 (customization for each of our
clients).  So since all requests have to come in through www.mywebsite.com I
would need redirects set up for each of these subdirectories as well.

So for example if my live site has a subdirectory "test1" then any attempts
to access /test1 through the other domain names must be redirected to
www.mywebsite.com/test1/. And so forth for each additional subdirectory.  If
I were to place everything outside the vhost container, then I would need to
set up one alias for /test1/ and also one Redirect permanent /test1/
http://www.mywebsite.com/test1/, and again so forth for each additional
subdirectory?  

Is that correct?  Or does it seem like mod_rewrite is a better way to go?

Thanks again!
Denise


-----Original Message-----
From: Jeff Cohen [mailto:support@gej-it.com] 
Sent: Monday, April 14, 2003 10:25 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Multiple httpd conf files? (New to list)


Hello Denise,

First of all for your own knowledge, any missing detail of each and every
Vhost in your conf file will be taken automatically from the Server
Configuration Section, which is global for all Vhosts together. It means
that if you'd like to have an alias /joke on all the Vhosts at once, you
have to add the line for it OUTSIDE of the Vhosts containers. (e.g. Alias
/joke /usr/folder/joke) - this should take effect on all Vhosts. Same thing
with Redirect permanent command. (e.g. Redirect permanent /joke
http://yoursitename.com/hello) - in this example make sure not to loop the
string by putting the same folder aliased in the Vhost container.

If that doesn't help and you actually *need* the same alias to be redirected
then you should use mod_rewrite and Joshua can help you with that. :-)

All the best,
Jeff Cohen


> -----Original Message-----
> From: Denise Mangano [mailto:DeniseM@complusdata.com]
> Sent: Monday, April 14, 2003 10:21 PM
> To: 'users@httpd.apache.org'
> Subject: [users@httpd] Multiple httpd conf files? (New to list)
> 
> Evening everyone.  I've tried searching through the archives and 
> reading
the
> FAQ's but can't seem to find a clear answer on the best way to handle 
> the following situation:
> 
> I am running Apache 1.3 on RH Linux 8.
> 
> I would like to have a website http://www.mywebsite.com allowable to 
> all. This will be my live site.
> 
> I would also like to have a test website, http://test.mywebsite.com 
> allowable only to localhost.
> 
> I also own 5 other domain names (www.mywebsites.com, 
> www.mywebsites.org, www.mywebsites.net, www.mywebsite.org, 
> www.mywebsite.net).  However, I need to ensure all users that type any 
> of these by mistake get redirected to
come
> in through www.mywebsite.com because this is the site that I 
> registered my SSL certificate for.
> 
> I am familiar with Apache enough to get this working - but I'm not 
> sure if
I
> handle it the right way.  The way I am trying to do it now is having 
> one httpd.conf file in the /etc/httpd/conf directory.  I set the 
> server name
to
> mywebsite.com.  In my htdocs folder I have two directories: mywebsite 
> and test.mywebsite with aliases and permissions set in the main 
> httpd.conf. I have a series of virtual host directives set up for the 
> other domains to redirect to www.mywebsite.com.  The only problem with 
> this is if my user tries to access www.mywebsite.org/forms/ I need to 
> redirect them to www.mywebsite.com/forms  and this can get pretty 
> tedious if I do this with
a
> bunch of redirects and aliases.
> 
> I am wondering if I can limit what I put in that main httpd.conf and
somehow
> configure an httpd.conf file for each individual site?  What would be 
> the best way to handle this?
> 
> I hope I have explained this clearly.  Thanks in advance for your 
> help. Denise
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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

---------------------------------------------------------------------
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