LinuxQuestions.org
Register a domain and help support LQ
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, 02: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, 02: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, 05: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, 06: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, 05: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 04:28 AM
Apache Alias and Scriptalias BernardLinux Linux - Newbie 1 10-12-2011 05:01 AM
redirect from webserver to internal server in lan in rhel4.0 msb_suresh80 Linux - Newbie 1 10-10-2008 12:31 PM
Apache 1.3 , SCRIPTALIAS problem! mesh2005 Linux - Networking 3 10-20-2005 07:39 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 11:32 PM


All times are GMT -5. The time now is 05:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration