Oops, meant to reply-all<br clear="all"><br>Jeremy<br>
<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 8:59 AM, Jeremy Kun <span dir="ltr"><<a href="mailto:kun.jeremy@gmail.com">kun.jeremy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The redirects are hitting port 8080, via the rules verbatim from that FAQ. Literally, I have the following in my httpd.conf:<div><br></div><div><span style="font-family:serif;font-size:medium"><table cellspacing="0">
<tbody><tr><td style="padding-left:0px;padding-right:0px"><p style="display:block;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:monospace"><span style="font-family:monospace">RewriteEngine on</span></span></p>
</td></tr><tr><td style="padding-left:0px;padding-right:0px"><p style="display:block;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:monospace"><span style="font-family:monospace">RewriteRule ^(.*)$ <a href="http://localhost:8080/$1" target="_blank">http://localhost:8080/$1</a> [P,NE]</span></span></p>
</td></tr></tbody></table></span></div><div><br></div><div>So I'm hitting my server at <a href="http://racket01.csc.calpoly.edu" target="_blank">http://racket01.csc.calpoly.edu</a>, and I get that redirect loop.</div>
<div><br></div><div>
I can't send a request directly to 8080 from outside because my server admin has blocked those ports, hence my desire to do this forwarding. I also can't enable permissions for racket to use <1024 ports via setcap, since the kernel I'm using is not recent enough.</div>
<div><br></div><div>And in case this will help, these are my serve/servlet options:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="'courier new', monospace">(serve/servlet</font></div>
</div><div><div><font face="'courier new', monospace"> start</font></div></div><div><div><font face="'courier new', monospace"> #:launch-browser? #f</font></div>
</div><div><div><font face="'courier new', monospace"> #:quit? #f</font></div></div><div><div><font face="'courier new', monospace"> #:listen-ip #f</font></div>
</div><div><div><font face="'courier new', monospace"> #:servlet-path "/"</font></div></div><div><div><font face="'courier new', monospace"> #:port 8080</font></div>
</div><div><div><font face="'courier new', monospace"> #:log-file (build-path "/home/jkun/racket/log.txt") </font></div></div><div><div><font face="'courier new', monospace"> #:extra-files-paths (list (build-path "/home/jkun/racket")))</font></div>
</div></blockquote><div><div><br></div><div>Any ideas?</div><br><font color="#888888">Jeremy</font><div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 6:29 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think I've seen that before and I thought it meant the redirect was<br>
set up wrong, but it doesn't seem like you have done that.<br>
<br>
What URL are the GETs to? What happens when you go to it directly?<br>
<br>
Jay<br>
<div><div></div><div><br>
On Thu, Sep 15, 2011 at 11:13 PM, Jeremy Kun <<a href="mailto:kun.jeremy@gmail.com" target="_blank">kun.jeremy@gmail.com</a>> wrote:<br>
> I'm trying to set up Apache to redirect to the Racket web server on port<br>
> 8080. Originally after modifying my http configuration file to include the<br>
> correct RewriteEngine and RewriteRule lines from this page, I got the<br>
> following error message:<br>
> [Thu Sep 15 21:43:19 2011] [error] (13)Permission denied: proxy: HTTP:<br>
> attempt to connect to <a href="http://127.0.0.1:8080" target="_blank">127.0.0.1:8080</a> (*) failed<br>
> A quick google search gives that the problem might be in the SELinux<br>
> security setting: Allow HTTPD scripts and modules to connect to the<br>
> network, which I suppose is turned off. So I ran<br>
> sudo /usr/sbin/setsebool httpd_can_network_connect 1<br>
> Now it appears to redirect (the racket web server logs show GET requests<br>
> from 127.0.0.1), but now it appears to be stuck in an infinite redirect<br>
> loop, resulting in the following Apache error message:<br>
> [Thu Sep 15 21:57:49 2011] [error] (111)Connection refused: proxy: HTTP:<br>
> attempt to connect to <a href="http://127.0.0.1:8080" target="_blank">127.0.0.1:8080</a> (*) failed<br>
> And an error page with Error 310 (net::ERR_TOO_MANY_REDIRECTS)<br>
> Has anyone else encountered this problem? I can't figure out where the<br>
> redirection is breaking down. There aren't any error messages in the racket<br>
> error logs, just an unnaturally large number of GET requests from 127.0.0.1.<br>
> Regards,<br>
> Jeremy<br>
><br>
</div></div>> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</font></blockquote></div><br></div></div></div>
</blockquote></div><br>