Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've tried adding this into my httpd.conf:
RewriteEngine On
RewriteRule ^/abc/def/ghij/kinetik_web_test/(.*)$ /abc/def/ghij/kinetik_web_test/hs.xsl/$1 [L]
The result? It does not work!
I got this in my httpd.conf as well right at the bottom:
Alias /static/ "/kinetik/ftppub/upl/"
<Directory "/kinetik/ftppub/upl/">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
FileETag MTime Size
</Directory>
It's me again, the guy that needs help constantly and consistently...
We don't mind as long as you come back and pass the answers along to others when you can
mod_rewrite... geez it's been a while since I've played with this :/ How is it not working? The rewrite just not seeming to happen at all, a 500 server error or the rewrite is working but the regex isn't quite right?
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
That's what I am struggling with.
When I try to access the page from another PC, I get a page that says "ACCESS RESTRICTED BY IP". I think this is like a standard errorpage though, since even if I type in a URL that doesn't exist on my Apache Server it still just brings up this message.
One of the other guys told me he tried to access the page from the server itself and there it seems to work just fine.
I'm starting to think the problem is somewhere else...
Quite possibly, keep checking your logs over and over, they always contain helpful information. One of my favourite debugging tools is 'tail -f /var/log/<some_log>' open in a window while I experiment
I put in some bogus underscores in the URL's above so the forum software doesn't url-ize them to where you can't easily see them in their entirety.
Did you try doing this OUTSIDE of Apache? Something like this:
Code:
cd (whatever_directory)/kinetik_web_test
ln -s ./hs.xsl/123_ENX_HTML.htm 123_ENX_HTML.htm
I haven't messed with mod_rewrite for a while, and I can't remember the syntax off the top of my head.
Also, look at your error_log file and see what the specific problem is. This will probably give you more detailed info than that browser "RESTRICTED BY IP ADDRESS" error message. I never really checked, but I didn't think Apache gave details in its return codes about why you were restricted. The fact that you were restricted, yes, but why?, no. I could be wrong about this, so don't quote me. Could it be that your browser is embellishing the message sent by Apache and mangling it in the process? error_log would point this out.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
Quote:
Originally Posted by cs-cam
Quite possibly, keep checking your logs over and over, they always contain helpful information. One of my favourite debugging tools is 'tail -f /var/log/<some_log>' open in a window while I experiment
Thanks cs-cam, the tail-thing is really good advice.
heartig, the thing is the server has Websphere running as well. It gets really confusing since it seems even if the Apache-side is working 100%, Websphere might still have a big say in the whole delivery. I don't know much about Apache, but I know absolutely nothing about Websphere.
I'm guessing, but I think the Apache side of things is working just fine. My money is on Websphere not playing ball, but then again I could be wrong. I'm going to work through the logs of Apache just to be sure and get someone with Java savvy to check out the Websphere side of things.
Stay tuned as I'll post what the eventual solution was as soon as it's been figured out, and thanks for the help so far!
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
IT's SOLVED!!!
Finally, we got it to work! The problem was indeed with Websphere. It seems it plugs into Apache (httpd.conf references it).
The Websphere has a conf file of it's own (startup.conf) where you can set the IPs of clients. I just added a *.*.*.* and she worked lovely!
But now I have another problem: I can get through to http://server/abc/def/ghij/kinetik_w..._ENX_HTML.htm/
but now I get an error saying that there was no stylesheet to transform the XML file to HTML (or something like that).
How can I get the XML file to still reference the HS.xsl stylesheet without having to add "hs.xsl" in the URL?
UPDATE
Nevermind, it seems the person that wanted this just needed to see the xml data across the web, which is exactly what's happening now!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.