LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2013, 01:45 AM   #1
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
Apache Webserver assistance in ScriptAlias / redirect


Hi All,
I am having trouble In Apache and was hoping you can help:

Code:
vim  /etc/httpd/conf.d/zzz_otrs.conf

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"

When I put the full path this loads the page fine:

http://localhost/otrs/index.pl


I comment out the above syntax and place the next option:

Code:
vim  /etc/httpd/conf.d/zzz_otrs.conf

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/index.pl"

This loads http://localhost/otrs/ and diverts to http://localhost/otrs/index.pl. So this loads the page fine.


However if I now type in the page http://localhost/otrs/index.pl this FAILS unless I use: http://localhost/otrs/

Is there a way to access the http page http://localhost/otrs/index.pl using both:

http://localhost/otrs/
http://localhost/otrs/index.pl

mod_rewrite???

Thanks
 
Old 10-21-2013, 01:59 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Might try two ScriptAlias directives. One for

Code:
ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
ScriptAlias /otrs/index.pl "/opt/otrs/bin/cgi-bin/index.pl"
Or maybe use the ScriptAliasMatch Directive.

Be advised that the order of ScriptAlias matters longest path should go first.
 
1 members found this post helpful.
Old 10-21-2013, 04:22 PM   #3
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Thanks for your help zhjim however this gave the same result:

However If I use:

Code:
ScriptAlias /otrs/index.pl "/opt/otrs/bin/cgi-bin/index.pl"
ScriptAlias /otrs1/ "/opt/otrs/bin/cgi-bin/index.pl"
This works fine, if I change the script alias for example to a different alias aka /otrs1.

I will see if I can figure out ScriptAliasMatch Directive.
 
Old 10-21-2013, 05:32 PM   #4
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Apologies looks to bet better now damn Browser Cache argh!

Thanks for your help!
 
Old 10-22-2013, 04:23 AM   #5
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Can't count how many times I tripped over it too. Guess thats those things that are not on the mind.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Could not get ScriptAlias to work on Virtualhost (on Apache). marlin Linux - Server 3 03-20-2013 03:28 AM
Apache Alias and Scriptalias BernardLinux Linux - Newbie 1 10-12-2011 04:01 AM
redirect from webserver to internal server in lan in rhel4.0 msb_suresh80 Linux - Newbie 1 10-10-2008 11:31 AM
Apache 1.3 , SCRIPTALIAS problem! mesh2005 Linux - Networking 3 10-20-2005 06:39 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration