0

I am still quite a newbie with Apache and its configurations and had an issue with my web server where I am serving Redmine a ruby application and also static content.

Apache 2.2

Currently have the following proxies set up:

ProxyPass /portal https://mypage.domain.com:8181/portal
ProxyPassReverse /portal https://mypage.domain.com:8181/portal

ProxyPass /examples http://mypage.domain.com:8555/portal
ProxyPassReverse /examples http://mypage.domain.com:8555/portal

ProxyPass / balancer://redmine_cluster/
ProxyPassReverse / balancer://redmine_cluster/

<Proxy balancer://redmine_cluster>
     BalancerMember http://REDMINEMACHINENAME:3000/
</Proxy>

DocumentRoot "X:/app/Redmine/public" 

<Directory "X:/app/Redmine/public">
        Require all granted
        Options -MultiViews
</Directory>

RequestHeader set X-Forwarded-Proto "https"

When trying to access:

Redmine:

mypage.domain.com

it takes me to Redmine. Good.

/portal:

mypage.domain.com/portal

it fails

Not Found The requested URL /portal/ was not found on this server.

WEB.SERVER.ADDRESS - - [09/Oct/2015:16:14:15 -0700] "GET /portal/ HTTP/1.1" 404 207
MY.IP.ADDRESS - - [09/Oct/2015:16:14:15 -0700] "GET /portal/ HTTP/1.1" 404 207

/examples

mypage.domain.com/examples

MY.IP.ADDRESS - - [09/Oct/2015:16:10:11 -0700] "GET /examples/ HTTP/1.1" 200 1285

works


Is it possible to get Apache configured so that I can use

mypage.domain.com
mypage.domain.com/portal
mypage.domain.com/examples

to get to all the places I need to get to? How?

Any suggestions on a better fitting title?

6
  • Can you show us the apache logs for an /examples request? Oct 9, 2015 at 22:46
  • Also can you possibly provide the irrelevant parts of the vhost config? Oct 9, 2015 at 22:46
  • @SomeLinuxNerd I included some more of whats in the vhost. There are a ton of partially commented SSL configuration stuff in that vhost config that I cannot post. is there anything in particular that you might be looking for? Also, I fiddled with it a little more and got /examples to work again. /portal still does not work. Oct 9, 2015 at 23:21
  • The error message "The requested URL /42portal/..." seems pretty critical. It looks like something is rewriting the URL! So I don't have the answer yet, but try downloading the browser plugin Live Headers and leave it running when you visit /portal. I bet something is doing a mod_rewrite at some point, when you figure out the chain whereby you end up at /42portal you should have a better idea where to look next. Additionally, there is an http verb called TRACE which is like a GET request that lets you see how your request goes through reverse proxies and load balancers. Oct 11, 2015 at 20:30
  • sorry its supposed to say /portal/ Oct 12, 2015 at 17:23

1 Answer 1

1

This isn't quite an answer but I ran out of room on the comment field. I set your config up on a laptop. This is definitely happening because you're proxying to an https site for /portal. If you can send it to a http site it will fix the problem immediately. I checked and like you (most likely) I have mod_proxy and mod_proxy_connect enabled (at least in the config), but for some reason the request isn't being sent to https site, regardless of port. Ubuntu its sort of hard to see what modules are actually loaded.

After seeing no data to the port on the sniffer, I straced apache2 and got:

[pid 397] read(5, <unfinished ...> [pid 458] accept4(4, 0xa9ee615c, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)

which isn't super useful but shows that absolutely no request is being made. You can play with the https part by it's self, it'll exhibit the same error regardless of the other proxied urls.

1
  • I also get a 503 error. Theres a slight chance that the error in the strace is from me messing with MaxClients to make it easier to strace, either way it doesnt work on my machine (Ubuntu 14.04 desktop edition). Oct 12, 2015 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .