Forum Moderators: phranque

Message Too Old, No Replies

site loads correctly using lan ip, but from other comps on same lan

         

apatchy

9:50 pm on Mar 17, 2012 (gmt 0)

10+ Year Member



I've got a configuration using ProxyPass for a webapp running on localhost to be accessible from example.com:9999 and a wordpress blog on example.com:80. the httpd.conf vhost setting like this:


<VirtualHost *:9999>
ServerAdmin admin@example.com
ServerName www.example.com
ServerAlias example.com

# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot /var/www/html/example.com/wordpress

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8888/
ProxyPassReverse / http://www.example.com:9999/
#ProxyPassReverseCookieDomain localhost:8888 www.example.com:9999/
ProxyPassReverseCookiePath / /

</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName www.example.com
ServerAlias example.com

# Indexes + Directory Root.

DirectoryIndex index.php
DocumentRoot /var/www/html/example.com/wordpress
</VirtualHost>


the computer (192.168.1.5) running apache itself is trying to serve wordpress from the standard example.com and proxy a localhost app on port 9999 (example.com:9999) to the internet. the wordpress site works from 192.168.1.5 from anywhere on the network (on port 80), but the localhost app proxy on 192.168.1.5:9999 works on 192.168.1.5 itself but not on other computers within the network. why would it only work on the originating server and not its peers?

incrediBILL

1:19 pm on Mar 18, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So if I understand, you're trying to run one site of port :80 and a different site off port :9999 on the same domain name?

They would be example.com:80 and example.com:9999 respectively?

I'm pretty sure you need a Listen directive somewhere in your httpd conf like:
Listen 9999

You may also need to edit the ports in some other places, can't remember off the top of my head.

apatchy

1:36 pm on Mar 18, 2012 (gmt 0)

10+ Year Member



Hi incrediBILL,
you understand correctly. I've already got the Listen directive in my httpd.conf. At the advice of another person, I've also added AllowConnect and changed ProxyPassReverse to match ProxyPass, but I still get the same strange behavior of the port 9999 app working only on the serving machine itself (and that from it's lan ip, not just from localhost:9999).

AllowConnect 9999 8888
ProxyPassReverse / http://localhost:8888/