Operating System - OpenVMS
1819681 Members
3639 Online
109605 Solutions
New Discussion юеВ

Apache Alias Configuration

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

Apache Alias Configuration

I've got Apache running on a test node, so I decided to try and fix a problem with alias redirection.

My HTTPD.CONF currently says :-

alias /webreport/ "/webreport$system/"
alias /WEBREPORT/ "/webreport$system/"

..which means that I have to enter the URL with a '/' on the end, i.e. "www.server.com/webreport/".

Can anyone tell me how I can set this up to work without the slash?

I've read through http://httpd.apache.org/docs/misc/FAQ.html#set-servername
, but couldn't make it work.

Cheers, Rob.
10 REPLIES 10
Willem Grooters
Honored Contributor

Re: Apache Alias Configuration

Rob,

I have no other access to my webserver but I'm sure I have solved this.
On the other hand. the link you suplied tells me the answer in paragraph 9.

reading this, I conclude:

Alias /example/ /home/www/example/

will require trailing slash in the URL, where

Alias /example /home/www/example

does not.

My idea is: remove the trailing slashes.
Willem Grooters
OpenVMS Developer & System Manager
Robert Atkinson
Respected Contributor

Re: Apache Alias Configuration

Tried that, and I just get a DNS error!
Willem Grooters
Honored Contributor

Re: Apache Alias Configuration

Rob,

to get it straihgt:

Specified WITH trailing slash:

http://server/examples/ is Ok,
http://server/examples is NOT.

as expected.
WHAT is shown? Directory listing, or have you specified an index file (index.html, deafult.htm - whatever)

Specified WITHOUT trailing slash:

http://server/examples/ is NOT
http://server/examples is NOT

NOT = 404-page?
Willem Grooters
OpenVMS Developer & System Manager
Robert Atkinson
Respected Contributor

Re: Apache Alias Configuration

Config is :-

alias /webreport "/webreport$system"
alias /WEBREPORT "/webreport$system"

URL is :-

http://gamma:8446/webreport

Response is :-
"Cannot find server or DNS Error
Internet Explorer"

"10.110.16.239 - raa [08/Apr/2004:11:19:49 +0000] "GET /webreport HTTP/1.1" 301 329"

Rob.
Willem Grooters
Honored Contributor

Re: Apache Alias Configuration

One thing to try:
I assume gamma has a domain as well:

http://gamma.domain.tld:8446/webreport

given that the fully qualified name is known in DNS or in the local HOST file of gamma itself.

Given the apache documentation, APACHE will try to redirect and tell the client what to use exactly. It must therefore know the server name. Either by 'guessing' - using DNS, probably - or you tell it - by the Servername directive.
Willem Grooters
OpenVMS Developer & System Manager
Robert Atkinson
Respected Contributor

Re: Apache Alias Configuration

Tried :-

http://gamma.tbs-ltd.co.uk:8446/webreport, but still the same error.

I also have a 'ServerName' directive, but this doesn't help either :-

ServerName gamma.tbs-ltd.co.uk

Rob.
Willem Grooters
Honored Contributor

Re: Apache Alias Configuration

Rob,

I still have the feeling (based on the Pacahe documentation) it's a matter of resolving names/adresses.

Check on gamma what DNS returns on it's own names (with and without domain) using NSLOOKUP and/or DIG. probably it will be Ok, but just to rule things out.
Do you run BIND on gamma as well, or do you use an external DNS only? It may be worthwile to check these as well. Beware of case! I would be surprised if case mattered.

I'l have a look on my server tonight. Stay tuned.

Willem
Willem Grooters
OpenVMS Developer & System Manager
Antoniov.
Honored Contributor

Re: Apache Alias Configuration

Stupid question: do you remember restart apache server after any change?
Link to apache hint write as follows:
alias /webreport "/webreport$system"
without trailing slash on both names.
On my local test system works this one too:
alias /webreport "/webreport$system/"

@Antoniov
Antonio Maria Vigliotti
Antoniov.
Honored Contributor
Solution

Re: Apache Alias Configuration

Hi Rob,
I think webreport$system is a logical name; don't forgot apache is projected for Unix so can't recognize reference. For example in ftp (also designed for Unix) if you type
cd webreport$system
doesn't work while typing
cd webreport$system:
works fine.
May be same problem on apache. Perhaps you could write
alias /webreport "webreport$system:/"

@Antoniov
Antonio Maria Vigliotti
Willem Grooters
Honored Contributor

Re: Apache Alias Configuration

Rob,

Just checked: I have my aliases with trailing slashed, currently - opposed to what I thought :-((
Anyway, I'll try to find out.
Willem Grooters
OpenVMS Developer & System Manager