Re: [us...@httpd] Compiling httpd-2.0.63 on CentOS 64bit

2010-04-26 Thread Al Sparks
Never mind.
   --with-expat=builtin
took care of it.
   === Al



- Original Message 
From: Al Sparks 
To: Apache Users 
Sent: Mon, April 26, 2010 3:16:56 PM
Subject: [us...@httpd] Compiling httpd-2.0.63 on CentOS 64bit

I'm trying to compile httpd-2.0.63 on a CentOS 5.4 64bit distro.

I am getting the error:

   /usr/lib/libexpat.so: could not read symbols: File in wrong format
   collect2: ld returned 1 exit status

I think that means that it should be looking for a 64 bit version of that .so 
file.

As it happens, there is also a file by that name in
   /usr/lib64

I tried renaming the 32 bit version of /usr/lib/libexpat.so to see if it would 
then try the 64 bit version, but with no joy.

What am I doing wrong?

Also, any other "gotchas" in compiling on a 64 bit linux distro would be 
appreciated.
   === Al


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Compiling httpd-2.0.63 on CentOS 64bit

2010-04-26 Thread Al Sparks
I'm trying to compile httpd-2.0.63 on a CentOS 5.4 64bit distro.

I am getting the error:

   /usr/lib/libexpat.so: could not read symbols: File in wrong format
   collect2: ld returned 1 exit status

I think that means that it should be looking for a 64 bit version of that .so 
file.

As it happens, there is also a file by that name in
   /usr/lib64

I tried renaming the 32 bit version of /usr/lib/libexpat.so to see if it would 
then try the 64 bit version, but with no joy.

What am I doing wrong?

Also, any other "gotchas" in compiling on a 64 bit linux distro would be 
appreciated.
   === Al


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Problem: .htaccess mod_rewrite RewriteRule line causes HTTP Error 500 messages instead of 404 ones

2010-04-26 Thread Vladislav Rastrusny
Hello.

I have a server with VBulletin forum (working under Apache 2.2,
CentOS). The default settings for it in .htaccess are as follows:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^gsmforum\.ru
RewriteRule (.*) http://www.gsmforum.ru/$1 [R=301,L]

# If you are having problems or are using VirtualDocumentRoot,
uncomment this line and set it to your vBulletin directory.
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
ReWriteRule ^entries/.* entry.php [QSA]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]

If I try to access any non-existent URL on forum like
www.example.com/ajdsjaskasajs, server throws HTTP 500 error.

Apache log says:

[Sun Apr 25 17:24:32 2010] [error] [client 82.211.152.12] Request
exceeded the limit of 10 internal redirects due to probable
configuration error. Use 'LimitInternalRecursion' to increase the
limit if necessary. Use 'LogLevel debug' to get a backtrace., referer:
http://www.gsmforum.ru/forumdisplay.php?424-%CD%EE%E2%EE%F1%F2%E8-%EF%F0%EE%E3%F0%E0%EC%EC%E0%F2%EE%F0%EE%E2

If I switch LogLevel to Debug I get something like this:

[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri =
/robots.txt.php.php.php.php.php.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri =
/robots.txt.php.php.php.php.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri =
/robots.txt.php.php.php.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri =
/robots.txt.php.php.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt.php.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt.php.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt.php.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt.php.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt.php
[Sun Apr 25 17:30:46 2010] [debug] core.c(3059): [client
95.25.70.85] redirected from r->uri = /robots.txt
[r...@server2 logs]# tail httpd_error.log
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri =
/clientscript.php.php.php.php.php.php.php, referer:
http://74.125.77.132/search?q=cache:bGPJ8XkSvlMJ:www.gsmforum.ru/showthread.php%3Ft%3D62479+%D0%A3%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BF%D0%B8%D0%BD%D0%B3%D0%B0+3G+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BC&cd=3&hl=ru&ct=clnk&gl=ru
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri =
/clientscript.php.php.php.php.php.php, referer:
http://74.125.77.132/search?q=cache:bGPJ8XkSvlMJ:www.gsmforum.ru/showthread.php%3Ft%3D62479+%D0%A3%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BF%D0%B8%D0%BD%D0%B3%D0%B0+3G+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BC&cd=3&hl=ru&ct=clnk&gl=ru
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri =
/clientscript.php.php.php.php.php, referer:
http://74.125.77.132/search?q=cache:bGPJ8XkSvlMJ:www.gsmforum.ru/showthread.php%3Ft%3D62479+%D0%A3%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BF%D0%B8%D0%BD%D0%B3%D0%B0+3G+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BC&cd=3&hl=ru&ct=clnk&gl=ru
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri = /clientscript.php.php.php.php,
referer: 
http://74.125.77.132/search?q=cache:bGPJ8XkSvlMJ:www.gsmforum.ru/showthread.php%3Ft%3D62479+%D0%A3%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BF%D0%B8%D0%BD%D0%B3%D0%B0+3G+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BC&cd=3&hl=ru&ct=clnk&gl=ru
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri = /clientscript.php.php.php,
referer: 
http://74.125.77.132/search?q=cache:bGPJ8XkSvlMJ:www.gsmforum.ru/showthread.php%3Ft%3D62479+%D0%A3%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D0%BF%D0%B8%D0%BD%D0%B3%D0%B0+3G+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BC&cd=3&hl=ru&ct=clnk&gl=ru
[Sun Apr 25 17:31:27 2010] [debug] core.c(3059): [client
217.118.79.27] redirected from r->uri = /clientscript

Re: [us...@httpd] mod_disk_cache causing corrupted output on server side includes?

2010-04-26 Thread Jeff Trawick
On Wed, Apr 21, 2010 at 1:00 PM, Geoff Millikan  wrote:
> You can see the corrupted/binary garbled mess on the page at the link here:
> http://www.t1shopper.com/tools/calculate/index.shtml
>
> The scrambled mess is outputted right at the server side include like this:
> 
>
> Everything else on the page looks fine, it's only the included file that's 
> mangled like this:
>  í\énÛH þ Ü|á]åâu?- SìA½¡!ŸÄoÿ›IÅÇsØß '±"’ÿ  ¼ñ*dL XúIp V.n§Œ ©ä Éb®H&Ùˆð˜ I
>
> If you look at the same page at the link below, everything is fine.
> http://www.t1shopper.com/tools/calculate/
>
> If I restart Apache, the problem remains but if I delete the disk_cache the 
> problem goes away.
> shell> rm -rf /var/httpd/proxy/*
>
> Why is mod_disk_cache screwing this include up?

I don't think this is a configuration issue; open a bug report at
https://issues.apache.org/bugzilla/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Update on TCP reset issue (kinda fixed)

2010-04-26 Thread Jeff Trawick
On Wed, Apr 21, 2010 at 6:08 PM, Derek Chen-Becker  wrote:
> Well, after a lot of digging and debugging, I found a hack that seems to
> fix my issue. If I modify the
>
> srclib/apr/support/unix/waitio.c
>
> file so that the line
>
> timeout    = f        ? f->timeout / 1000 : s->timeout / 1000;
>
> becomes
>
> timeout    = f        ? f->timeout / 100 : s->timeout / 100;
>
> (10 times the timeout), then things start working. Unfortunately,
> despite my best efforts, I can't figure out
>
> 1) where the apr_wait_for_io_or_timeout function is being called that
> leads to this timeout
> 2) what the actual timeout is
> 3) where I could modify said timeout

The Timeout directive should control this for client connections.
What is the value of your Timeout directive?

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Mauri
Many thanks to Jonas and Tom for the suggest and support.

Now I've understood the problem.

I have just used the ProxyPassReverse but in this scenario it was different.
The location that proxy traps was http://mysite.com and not
http://10.19.72.127:8080/. This behavior was caused by the use of
ProxyPreserveHost On, I think...

Many thanks to all.

Cheers,
Mauri


2010/4/26 Tom Evans 

> On Mon, Apr 26, 2010 at 3:15 PM, Mauri  wrote:
> >
> > Thanks tom for the reply.
> >
> > about your request. This is the first call... others log is in
> > http://mysite.com/bla/bla/bla
> >
> > I want that only http header will be https://mysite.com/bla/bla/bla and
> not
> > http://mysite.com/bla/bla/bla
> >
> > many thanks.
> >
> > Cheers,
> > Mauri
> >
> > --
> > https://mysite.com/arsys/
> >
> > GET /arsys/ HTTP/1.1
> > Host: mysite.com
> > User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2) Gecko/20100115
> > Firefox/3.6
> > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> > Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 115
> > Connection: keep-alive
> > Cookie:
> IP-Restriction-GUID="84e039146ac96dec:-54437c22:1283941439a:-7fd1"
> >
> > HTTP/1.1 302 Moved Temporarily
> > Date: Mon, 26 Apr 2010 14:02:09 GMT
> > Server: Apache-Coyote/1.1
> > Location: http://mysite.com/arsys/shared/login.jsp?/arsys/
>
> ^^
>
> Apache did not generate that redirect, your backend application did.
> Nothing apache can do about your backend being daft. Get your backend
> to generate relative urls, or to use the incoming host header to
> generate absolute urls, or get it to generate absolute using the same
> name you address it by in the config.
>
> I'll explain again what ProxyPassReverse does, with this configuration
> 
>  ProxyPass http://10.19.72.127:8080/
>  ProxyPassReverse http://10.19.72.127:8080/
> 
>
> Your backend generates a 302 response, with a header
> Location: http://10.19.72.127:8080/foo/bar/
>
> The proxy sees this and replaces the proxied URL
> (http://10.19.72.127:8080/) with the location specified in apache (/).
> Location: /foo/bar/
>
> It then generates a canonical URL with the requested host name /
> server name (depending on the value of UseCanonicalName), which is
> what the client sees:
> Location: https://mysite.com/foo/bar/
>
> Your backend is generating this header:
> Location: http://mysite.com/arsys/shared/login.jsp?/arsys/
>
> This doesn't match the ProxyPassReverse, so doesn't get rewritten.
>
> I can't be any clearer than this. I hope this helps you.
>
> Tom
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Tom Evans
On Mon, Apr 26, 2010 at 3:15 PM, Mauri  wrote:
>
> Thanks tom for the reply.
>
> about your request. This is the first call... others log is in
> http://mysite.com/bla/bla/bla
>
> I want that only http header will be https://mysite.com/bla/bla/bla and not
> http://mysite.com/bla/bla/bla
>
> many thanks.
>
> Cheers,
> Mauri
>
> --
> https://mysite.com/arsys/
>
> GET /arsys/ HTTP/1.1
> Host: mysite.com
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2) Gecko/20100115
> Firefox/3.6
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 115
> Connection: keep-alive
> Cookie: IP-Restriction-GUID="84e039146ac96dec:-54437c22:1283941439a:-7fd1"
>
> HTTP/1.1 302 Moved Temporarily
> Date: Mon, 26 Apr 2010 14:02:09 GMT
> Server: Apache-Coyote/1.1
> Location: http://mysite.com/arsys/shared/login.jsp?/arsys/

^^

Apache did not generate that redirect, your backend application did.
Nothing apache can do about your backend being daft. Get your backend
to generate relative urls, or to use the incoming host header to
generate absolute urls, or get it to generate absolute using the same
name you address it by in the config.

I'll explain again what ProxyPassReverse does, with this configuration

  ProxyPass http://10.19.72.127:8080/
  ProxyPassReverse http://10.19.72.127:8080/


Your backend generates a 302 response, with a header
Location: http://10.19.72.127:8080/foo/bar/

The proxy sees this and replaces the proxied URL
(http://10.19.72.127:8080/) with the location specified in apache (/).
Location: /foo/bar/

It then generates a canonical URL with the requested host name /
server name (depending on the value of UseCanonicalName), which is
what the client sees:
Location: https://mysite.com/foo/bar/

Your backend is generating this header:
Location: http://mysite.com/arsys/shared/login.jsp?/arsys/

This doesn't match the ProxyPassReverse, so doesn't get rewritten.

I can't be any clearer than this. I hope this helps you.

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Jonas Eckerman
It would be nice if you answer some preliminary questions before asking 
for clarification about my answer below:


Have you read the documentation for the directives you are trying to use?

Are there some specific parts of the documentation that are unclear or 
difficult?


Now on to my answer...

On 2010-04-26 16:15, Mauri wrote:

> 
>   ProxyPassReverse http://10.19.72.127:8080/

Your ProxyPassReverse directive tells the proxy to rewrite 
"http://10.19.72.127:8080/"; in some headers.


> HTTP/1.1 302 Moved Temporarily
> Location: http://mysite.com/arsys/shared/login.jsp?/arsys/

The location header URL starts with "http://mysite.com/";.

Is that an incorrectly rewritten URL, or does the backend use 
"http://mysite.com/"; (which does not match "http://10.19.72.127:8080/";) 
in headers?


It would be good to know what the the corresponding result would be when 
you do the request directly to the backend.


What's the complete answer for

?

/Jonas

--
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Mauri
Thanks tom for the reply.

about your request. This is the first call... others log is in
http://mysite.com/bla/bla/bla

I want that only http header will be https://mysite.com/bla/bla/bla and not
http://mysite.com/bla/bla/bla

many thanks.

Cheers,
Mauri

--
https://mysite.com/arsys/

GET /arsys/ HTTP/1.1
Host: mysite.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2) Gecko/20100115
Firefox/3.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: IP-Restriction-GUID="84e039146ac96dec:-54437c22:1283941439a:-7fd1"

HTTP/1.1 302 Moved Temporarily
Date: Mon, 26 Apr 2010 14:02:09 GMT
Server: Apache-Coyote/1.1
Location: http://mysite.com/arsys/shared/login.jsp?/arsys/
Content-Length: 0
Set-Cookie: JSESSIONID=B1A3E37C4BA0882B288AB46596E18BA4; Path=/arsys
Set-Cookie: q=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Set-Cookie: LB-COOKIE=rd30o0a134864o8080; path=/
Connection: close
Content-Type: text/plain; charset=UTF-8
--


2010/4/26 Tom Evans 

> On Mon, Apr 26, 2010 at 2:11 PM, Mauri  wrote:
> >
> > One more bit.
>
> Really? Sure it's not just the same things being repeated over and
> over again, without any testing or actual explanation of the problem?
>
> >
> > Why I don't get a secure connection on the browser? I type
> > https://mysite.com and get redirected to http://mysite.com
>
> Because your proxied application tells it to do so. The only apache
> directive that affects redirects from proxies is the ProxyPassReverse
> directive. Basically it says 'if you see a redirect like
> '${A}/blah/blah/', change it to ${B}/blah/blah/'.
>
> Your ProxyPassReverse says to replace http://10.19.72.127:8080/ with
> https://mysite.com/ .
>
> If you think that apache is somehow doing this redirect, please show
> some evidence, eg browser header logs from livehttpheaders, or a
> complete tcpdump on the proxy showing http traffic from the client to
> the proxy, from the proxy to the backend, from the backend back to the
> proxy and from the proxy back to the client.
>
> Tom
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Tom Evans
On Mon, Apr 26, 2010 at 2:11 PM, Mauri  wrote:
>
> One more bit.

Really? Sure it's not just the same things being repeated over and
over again, without any testing or actual explanation of the problem?

>
> Why I don't get a secure connection on the browser? I type
> https://mysite.com and get redirected to http://mysite.com

Because your proxied application tells it to do so. The only apache
directive that affects redirects from proxies is the ProxyPassReverse
directive. Basically it says 'if you see a redirect like
'${A}/blah/blah/', change it to ${B}/blah/blah/'.

Your ProxyPassReverse says to replace http://10.19.72.127:8080/ with
https://mysite.com/ .

If you think that apache is somehow doing this redirect, please show
some evidence, eg browser header logs from livehttpheaders, or a
complete tcpdump on the proxy showing http traffic from the client to
the proxy, from the proxy to the backend, from the backend back to the
proxy and from the proxy back to the client.

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Mauri
One more bit.

Why I don't get a secure connection on the browser? I type
https://mysite.com and get redirected to http://mysite.com

In my scenario, for the backend application, I have to use in the ssl.conf
the set "ProxyPreserveHost On"

NameVirtualHost mysite.com:443

ServerName mysite.com
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://10.19.72.127:8080/
ProxyHTMLURLMap http://10.19.72.127:8080 /

ProxyPassReverse http://10.19.72.127:8080/
ProxyHTMLEnable On
ProxyHTMLURLMap  /  /
RequestHeaderunset  Accept-Encoding


Many thanks for any suggest.
Cheers,
Mauri





2010/4/22 Mauri 

> Hi experts,
>
> this is my scenario:  https://miosito.com --> mod_proxy -->
> http://10.19.72.100:8080/ (tomcat)
>
> httpd conf:
>
> NameVirtualHost mysite.com:443
> 
> ProxyPreserveHost On
> ProxyRequests off
> ProxyPass / http://10.19.72.100:8080/
> ProxyHTMLURLMap http://10.19.72.100:8080 /
> 
> ProxyPassReverse http://10.19.72.100:8080/
> ProxyHTMLEnable On
> ProxyHTMLURLMap  /  /
> RequestHeaderunset  Accept-Encoding
> 
> [SSL directive...]
>
> When I digit
> https://mysite.com it becomes http://mysite.com because I think that hte
> proxypass is http...
> It's wrong, I want that the URL will be https://mysite.com but I can use
> the ProxyPreserveHost (one backend application need to this set).
>
> any idea?
> many thanks, as usual.
>
> Cheers,
> Mauri


Re: [us...@httpd] Apache Rewrite and JkMount

2010-04-26 Thread Julien Cigar

Philip Hunt (Straker Software) wrote:

Hi,



Hello,

I have the following Rewrite config, to pass requests through Apache to 
Tomcat using AJP:


RewriteEngine on
RewriteRule ^/abc - [L,PT]
RewriteRule (.*) /abc$1 [L,PT]

JkMount /abc/* node1


just curious, why not using mod_proxy_ajp ?



This works, to the point that requests to http://sitename/ are rewritten 
to http://sitename/abc ... and the JkMount directive finds a match, and 
passes the request off to a worker.


However, I need JkMount to preserve the rewritten URI and it doesn't 
appear to be doing that.


A request to http://sitename/ gets rewritten to http://sitename/abc ... 
but, goes to the worker as http://sitename/


Does anyone know how I can preserve the rewritten URI when passing to 
the worker?



Thanks,
Phil

--
Philip Hunt
System Administrator
Straker Software
phone: +64 28 899 4802
email: philip.h...@strakersoftware.com 


web: http://www.shadocms.com



--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
<>
-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

[us...@httpd] Apache Rewrite and JkMount

2010-04-26 Thread Philip Hunt (Straker Software)
Hi,

I have the following Rewrite config, to pass requests through Apache to
Tomcat using AJP:

RewriteEngine on
RewriteRule ^/abc - [L,PT]
RewriteRule (.*) /abc$1 [L,PT]

JkMount /abc/* node1

This works, to the point that requests to http://sitename/ are rewritten to
http://sitename/abc ... and the JkMount directive finds a match, and passes
the request off to a worker.

However, I need JkMount to preserve the rewritten URI and it doesn't appear
to be doing that.

A request to http://sitename/ gets rewritten to http://sitename/abc ... but,
goes to the worker as http://sitename/

Does anyone know how I can preserve the rewritten URI when passing to the
worker?


Thanks,
Phil

-- 
Philip Hunt
System Administrator
Straker Software
phone: +64 28 899 4802
email: philip.h...@strakersoftware.com
web: http://www.shadocms.com


[us...@httpd] Internal server error simulation using mod_rewrite

2010-04-26 Thread alin vasile
Hi,
 
 Can i use the follwoing rule to simulate an internal server error?

RewriteRule .* - [R=500,L]

Thanks,
Alin



  

Re: [us...@httpd] mod_proxy_html.c failed to build on Solaris 10

2010-04-26 Thread Nick Kew

On 26 Apr 2010, at 11:58, Tapan Maheshwari wrote:

> Hi.
> I tried to build  mod_proxy_html.c on solaris 10 with following command
> $ /usr/apache2/bin/apxs -c -I /usr/include/libxml2/ -i mod_proxy_html.c
> 
> I got following error message:
> 
> /var/apache2/build/libtool --silent --mode=compile /opt/SUNWspro/bin/cc 
> -prefer-pic -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -xO4 
> -DSSL_EXPERIMENTAL -DSSL_ENGINE  -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS 
> -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  
> -I/usr/apache2/include  -I/usr/apache2/include   -I/usr/apache2/include  
> -I/usr/include/libxml2/  -c -o mod_proxy_html.lo mod_proxy_html.c && touch 
> mod_proxy_html.slo
> /var/apache2/build/libtool: line 1279: /opt/SUNWspro/bin/cc: No such file or 
> directory
> apxs:Error: Command failed with rc=65536

You can't compile anything without a compiler!

Where did your apache2 come from?  You presumably didn't build it,
or apxs would use the same compiler you used for that.  Check whether
a mod_proxy_html is available from the same source.

-- 
Nick Kew
-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[us...@httpd] mod_proxy_html.c failed to build on Solaris 10

2010-04-26 Thread Tapan Maheshwari
Hi.I tried to build  mod_proxy_html.c on solaris 10 with following command$ 
/usr/apache2/bin/apxs -c -I /usr/include/libxml2/ -i mod_proxy_html.c
I got following error message:
/var/apache2/build/libtool --silent --mode=compile /opt/SUNWspro/bin/cc 
-prefer-pic -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -xO4 
-DSSL_EXPERIMENTAL -DSSL_ENGINE  -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS 
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/apache2/include 
 -I/usr/apache2/include   -I/usr/apache2/include  -I/usr/include/libxml2/  -c 
-o mod_proxy_html.lo mod_proxy_html.c && touch 
mod_proxy_html.slo/var/apache2/build/libtool: line 1279: /opt/SUNWspro/bin/cc: 
No such file or directoryapxs:Error: Command failed with rc=65536


Thanks.Tapan


  

[us...@httpd] My own module, authorization and Proxy

2010-04-26 Thread Petr Hracek
Hello *,

In my Apache2 (2.2.3) configuration file I have:

SSLEngine on
SSLProxyEngine on
DocumentRoot "/opt/apache/htdocs/ssldocs"
ProxyPass   /PAC/   http://192.168.187.101:8080/PACCBAdmin
ProxyPassReverse/PAC/   http://192.168.187.150:8080/PACCBAdmin/

RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteMap unity txt:/opt/apache/conf/unity.map
RewriteRule ^/([^/]+)$  ${unity:$1|/$1} [L]
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
RewriteRule ^/PAC$ http://192.168.187.150:8080/PACCBAdmin [P]
RewriteRule ^/PAC/(.*) http://192.168.187.150:8080/PACCBAdmin/$1 [P]
RewriteLog "/var/log/apache2/rewrite_log"
RewriteLogLevel 3



Options +Indexes +Multiviews
AuthType MSEC
require valid-user
satisfy Any




ProxyPassReverseCookiePath /PACCBAdmin /PAC
AuthType  MSEC
   require valid-user




In the my modules which takes care about AAA, Security issues, etc.
I would like to do something like:
when user add to the URL following https:///PAC/
then first of all they should enter username/password authorization and
afterwards proxy page is opened. Authorization is done over AuthType MSEC in
my own module
When the RewriteRules are done as above then URL https:///PAC/
is authorized by my module
but page which is shown in browser is HTTP 404.

When the RewriteRule:
RewriteRule ^/PAC$ http://192.168.187.150:8080/PACCBAdmin [P]
RewriteRule ^/PAC/(.*) http://192.168.187.150:8080/PACCBAdmin/$1 [P]
is moved before
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
then username/password page is not shown but /PAC/ URL is working (but
without authoziation.
As I found in the RewriteRule instead of row
RewriteRule ^/([^/]+)/(.*)  ${unity:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L]
which means that this RewriteRule is last should be something else.

Could you please help me with that issue

Thank you in advance

-- 
Best Regards / S pozdravem
Petr Hracek


Re: [us...@httpd] Alias and HTTP 404 Not Found Error - But the file is THERE!

2010-04-26 Thread Karan Grover
Please check with your link existance which you are providing in the Alias.
I made the same mistake some time back and got the same errors.

Karan Grover




On Mon, Apr 26, 2010 at 6:18 AM, Wang, Mary Y wrote:

> Oops.. I made an error in my email. When the URL goes there "
> https://download-devtest2.ana.bna.boeing.com/test-download/devtest2-1/excel_download_error.bmp";..
>  I got the 404 File Not Found error.
>
> Mary
>
> -Original Message-
> From: Wang, Mary Y
> Sent: Sunday, April 25, 2010 7:58 AM
> To: users@httpd.apache.org
> Subject: [us...@httpd] Alias and HTTP 404 Not Found Error - But the file
> is THERE!
>
> Hi,
>
> I've been struggling with the following problem for two hours already, and
> read posts, blogs, lists and Migration docs.  People suggested different
> things.
> I'm in the process of migrating from Apache 1.3.x to Apache 2.0.46.  The
> code listed below in the httpd.conf used to work on Apache 1.3.x, now I
> receive the HTTP 404 File Not Found Error even though the file is there.
>  Please note the stuff declared in the conf.d/ssl.conf used to be in
> conf/httpd.conf in Apache 1.3.x.
>
> in /etc/httpd/conf httpd.conf
> 
> Alias /test-download/ /usr/test3.1/download/
> 
>AllowOverride All
>Order allow,deny
>Allow from all
> 
>
> in /etc/httpd/conf.d/ssl.conf
> -
> 
> ServerName download-devtest2.ana.bna.boeing.com
> 
>
> When the URL goes there
> https://download-devtest2.ana.bna.boeing.com/test-download/devtest2-1/excel_download_error.bmp
> <
> https://download-devbrass2.ana.bna.boeing.com/brass-download/devbrass2-1/excel_download_error.bmp>,
> I get the 404 File Not Found error.  Even though the file is there.
>
> Is there something different about Apache 2.0.46 in the alias area?
> Any suggestions or hints?
>
> Thanks in advance.
> Mary
>
>
>
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [us...@httpd] Re: ProxyPreserveHost On

2010-04-26 Thread Mauri
someone can help me? many thanks as usual.

for recap this is my problem:

When I digit https://mysite.com it becomes http://mysite.com because I think
that the proxypass is http.
It's wrong, I want that the URL will be https://mysite.com but I can use the
ProxyPreserveHost (one backend application need to this set).

this is my ssl.conf:

NameVirtualHost mysite.com:443

ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://10.19.72.100:8080/
ProxyHTMLURLMap http://10.19.72.100:8080 /

ProxyPassReverse http://10.19.72.100:8080/
ProxyHTMLEnable On
ProxyHTMLURLMap  /  /
RequestHeaderunset  Accept-Encoding

[SSL directive...]


2010/4/23 Mauri 

>
> it's in ssl.conf, just
>
> # cat /etc/httpd/conf.d/ssl.conf
> [...]
>
> ProxyPreserveHost On
> ProxyRequests off
> ProxyPass / http://10.19.72.100:8080/
> ProxyHTMLURLMap http://10.19.72.100:8080 /
> 
> ProxyPassReverse http://10.19.72.100:8080/
> ProxyHTMLEnable On
> ProxyHTMLURLMap  /  /
> RequestHeaderunset  Accept-Encoding
> 
> [...]
>
> but It don't work in my httpd-2.2.3-31. The error is below in my previous
> mail.
>
> Cheers,
> Mauri
>
>
> 2010/4/23 GB GB 
>
> I had the exact same problem
>> Instead of putting those lines in httpd.conf, try putting them in ssl.conf
>> I am running version 2.0.54, and ssl.conf directives worked for me.
>>
>> regards,
>>
>> On Fri, Apr 23, 2010 at 9:51 AM, Mauri  wrote:
>> >
>> > Someone can help me?
>> >
>> > cheers,
>> > Mauri
>> >
>> >
>> > 2010/4/22 Mauri 
>> >>
>> >> Hi experts,
>> >>
>> >> this is my scenario:  https://miosito.com --> mod_proxy -->
>> >> http://10.19.72.100:8080/ (tomcat)
>> >>
>> >> httpd conf:
>> >>
>> >> NameVirtualHost mysite.com:443
>> >> 
>> >> ProxyPreserveHost On
>> >> ProxyRequests off
>> >> ProxyPass / http://10.19.72.100:8080/
>> >> ProxyHTMLURLMap http://10.19.72.100:8080 /
>> >> 
>> >> ProxyPassReverse http://10.19.72.100:8080/
>> >> ProxyHTMLEnable On
>> >> ProxyHTMLURLMap  /  /
>> >> RequestHeaderunset  Accept-Encoding
>> >> 
>> >> [SSL directive...]
>> >>
>> >> When I digit
>> >> https://mysite.com it becomes http://mysite.com because I think that
>> hte
>> >> proxypass is http...
>> >> It's wrong, I want that the URL will be https://mysite.com but I can
>> use
>> >> the ProxyPreserveHost (one backend application need to this set).
>> >>
>> >> any idea?
>> >> many thanks, as usual.
>> >>
>> >> Cheers,
>> >> Mauri
>> >
>>
>> -
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>>
>