I'd like to find a text match "app1.ear" and print the lines above and below until certain makers/boundaries are found <app-deployment> and </app-deployment>.
Sample search match: app1.ear
Sample Imput Text:
<app-deployment>
<target>AppCluster</target>
<module-type>ear</module-type>...
I found this on Google search.
You can shut those proxy requests down with something like this:
# Restrict HTTP methods
RewriteCond %{REQUEST_METHOD} !^(GET¦HEAD¦OPTIONS¦POST)$
RewriteRule .* - [F]
# block proxy requests
RewriteCond %{THE_REQUEST} ^(GET¦HEAD¦POST)\ /?http:// [NC]
RewriteCond...
If you can use mod_rewrite, one of the following may work for you. If you would send examples of the URLs that should reidrect/not redirect, that would help.
The patterns below should redirect URLs that have something inserted before /index.php example: /something/index.php
The RewriteCond...
Possibly using apache mod_rewrite with the Passthrough flag? I think it should rewrite the URL in the browser, but pass through the original request.
RewriteEngine on
RewriteRule ^/test\.html;JSESSIOND=.* /test.html [PT]
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
netstat -an|grep 161|grep LISTEN
or if you have lsof, you'll get more details on the process using the port if any
lsof -V|grep 161|grep LISTEN
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
I had better luck with ps-ec instead of ps -ef
#!/bin/sh
set -x
PROCESS_NAME=$1
# filter grep from results
NAME_FILTERS="grep"
# example of multipe filters with a | as a delimeter
#NAME_FILTERS="grep|java"
check_Process()
{
PROCESS_MATCH=`ps -ec|grep $PROCESS_NAME|egrep -v...
Here's an example where you can pass the process name as an argument.
#!/bin/sh
# example: ./check_process icssvr
PROCESS_NAME=$1
# filter grep from results
NAME_FILTERS="grep"
# example of multiple filters with a | as a delimiter
#NAME_FILTERS="grep|java"
check_Process()
{...
You'll need the module mod_proxy installed and loaded to use ProxyRequests. In My my case, this module exists in the modules subfolder. I'm running on RedHat 4 Linux.
Example:
LoadModule proxy_module modules/mod_proxy.so
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
# directives outside of virtual hosts are global
# if the domain name you use for requests does not match a virtual host, it will default to the first one listed
# enables virtual hosts
NameVirtualHost *
# directives inside the virtual host only apply for requests to that virtual host...
This is with the assumption of the following:
End User URL http://login.somedomain.com/ maps to Internal URL http://one-of-my-ips.dir/
Add one of the following to your server1 running login.somedomain.com
ProxyRequests On
ProxyPass / http://one-of-my-ips/dir/
ProxyPassReverse /...
One more example with a sub dir.
ProxyRequests On
ProxyPass /dir/ http://your.appserver.com/dir/
ProxyPassReverse /dir/ http://your.appserver.com/dir/
Or
RewriteRule ^/dir/(.*) http://your.appserver.com/dir/$1 [P]
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
Here's one way.
ProxyRequests On
ProxyPass / http://your.appserver.com/app/
ProxyPassReverse / http://your.appserver.com/app/
Here's another.
RewriteRule ^/(.*) http://your.appserver.com/app/$1 [P]
You can also filter the rewrite rule so only certain requests follow the proxy with...
Can you post your config section that forces the authentication? I would imagine that you would want to add an exception rule for the custom 403 page to not require authentication.
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
Looks like I had a typo in the last post. I think route should be router.
JkMount /manager/* jkstatus
JkMount /examples/* router
JkMount /thr3/jsp/* router
JkMount /thr3/* router
JkMount /thr3/*.jsp router
How about adding the following as a test?
JkMount /*.jsp router
Rob
Rob Jordan...
I'm taking a wild guess here as I haven't worked much with Tomcat, only Apache, but I noticed the following in your config and thought that the JkMount directives might be what is allowing the jsp to execute on certain URL paths.
JkMount /manager/* jkstatus
JkMount /examples/* router
JkMount...
You could also combine the two in a shell script.
find . -name "*.ext"|while read RECORD
do
echo $RECORD
# you could also manipulate the record here or run other commands
done
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
I worked out a simpler solution.
RewriteCond %{QUERY_STRING} ^part=(.)(.*)
RewriteRule .*page.cgi %1/%1%2? [R=301,L]
Rob
Rob Jordan
http://www.linkedin.com/in/robjordan
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.