You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joe Kmoch <km...@whs.edu> on 2002/05/18 20:56:51 UTC
aliases
We have a site for which I've defined a bunch of aliases like this:
Alias /alumni "/var/apache/htdocs/alumni/"
Alias /alumni/ "/var/apache/htdocs/alumni/"
These work fine with the assumption that the main file is called index.htm
in the alumni subdirectory.
We are working on a revised site and would like to have a similar set of
aliases work for that revised site. The site is defined as a Virtual site
using port 8080. I'd like to have these same aliases work on the revise
site when someone is accessing that site on port 8080. I can understand
that since the alias points to the original site's document root, that it
will come up with that site's version of, for example, alumni.
How can I set up a set of aliases for each of these two sites?
I just tried restating the aliases like this:
Alias /alumni "/home/kmoch/whs-site/httpdocs/alumni/"
Alias /alumni/ "/home/kmoch/whs-site/httpdocs/alumni/"
These work except that they provide a directory of alumni. This is
because there is no index.htm, but instead in the new site we have named
it alumni.htm. When you click on alumni.htm, you get to that page.
However, when I change the aliases to:
Alias /alumni "/home/kmoch/whs-site/httpdocs/alumni/alumni.htm"
Alias /alumni/ "/home/kmoch/whs-site/httpdocs/alumni/alumni.htm"
it can't find the page. Can you help me understand why this is the case?
(By the way, I have two similar aliases because I have never been able to
get the rewrite rules to work for me).
Thanks for your time.
--
Joe Kmoch Washington High
School Director, Academy of Information Technology 2525 N. Sherman Blvd
kmoch@whs.edu Milwaukee, WI 53210
(414) 875-5982 (desk) (414) 875-5900 (school)
(414) 875-5980 (academy) (414) 875-5915 (fax)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: aliases
Posted by Alex Togstad <sn...@3dretreat.com>.
Wht version of Apache?
If you would like a different file extenstion such as ".shtml" or even
"html" for your files that reside in your dir you will need to set
what types of files you want to use in Apache 1.3.xx
In this case, I have set a few different files extenstions because I'm
always changing the main page may it be default.asp, or index.shtml I know
that when you go to my IP or domain that my page will show up.
<IfModule mod_dir.c>
DirectoryIndex index.asp default.asp index.shtml index.php
</IfModule>
The dir browsing happens when you dont have the specific dir permissions
set. As an example here is a dir that does not allow dir browsing, but
allows img viewing etc.
#My Room
Alias /myroom/ "C:/www/htdocs/myroom/
<Directory "C:/www/htdocs/myroom/">
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
That should work for ya!! All this is considering you have Apache 1.3.. I
guessed since you did not tell us what version you were using, plus what OS
etc. .
Good Luck!
Alex Togstad
Web Developer
alextogstad@3dretreat.com
----- Original Message -----
From: "Joe Kmoch" <km...@whs.edu>
To: <us...@httpd.apache.org>
Sent: Saturday, May 18, 2002 11:56 AM
Subject: aliases
> We have a site for which I've defined a bunch of aliases like this:
>
> Alias /alumni "/var/apache/htdocs/alumni/"
> Alias /alumni/ "/var/apache/htdocs/alumni/"
>
> These work fine with the assumption that the main file is called index.htm
> in the alumni subdirectory.
>
> We are working on a revised site and would like to have a similar set of
> aliases work for that revised site. The site is defined as a Virtual site
> using port 8080. I'd like to have these same aliases work on the revise
> site when someone is accessing that site on port 8080. I can understand
> that since the alias points to the original site's document root, that it
> will come up with that site's version of, for example, alumni.
>
> How can I set up a set of aliases for each of these two sites?
>
> I just tried restating the aliases like this:
>
> Alias /alumni "/home/kmoch/whs-site/httpdocs/alumni/"
> Alias /alumni/ "/home/kmoch/whs-site/httpdocs/alumni/"
>
> These work except that they provide a directory of alumni. This is
> because there is no index.htm, but instead in the new site we have named
> it alumni.htm. When you click on alumni.htm, you get to that page.
> However, when I change the aliases to:
>
> Alias /alumni "/home/kmoch/whs-site/httpdocs/alumni/alumni.htm"
> Alias /alumni/ "/home/kmoch/whs-site/httpdocs/alumni/alumni.htm"
>
> it can't find the page. Can you help me understand why this is the case?
> (By the way, I have two similar aliases because I have never been able to
> get the rewrite rules to work for me).
>
> Thanks for your time.
>
> --
> Joe Kmoch Washington High
> School Director, Academy of Information Technology 2525 N. Sherman Blvd
> kmoch@whs.edu Milwaukee, WI 53210
> (414) 875-5982 (desk) (414) 875-5900 (school)
> (414) 875-5980 (academy) (414) 875-5915 (fax)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org