Setup proxy with Apache 2.4 on Mac 10.8

Posted by Aptos on Server Fault See other posts from Server Fault or by Aptos
Published on 2012-10-27T10:17:00Z Indexed on 2012/10/27 11:04 UTC
Read the original article Hit count: 290

Filed under:
|
|
|

I have 1 application (Java) that running on my local machine (localhost:9000). I want to setup Apache as a front end proxy thus I used following configuration in the httpd.conf:

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

Listen 57173

LoadModule proxy_module modules/mod_proxy.so

<VirtualHost *:9999>
  ProxyPreserveHost On
  ServerName project.play
  ProxyPass / http://127.0.0.1:9000/Login
  ProxyPassReverse / http://127.0.0.1:9000/Login
  LogLevel debug
</VirtualHost>

ServerName localhost:57173

I change my vim /private/etc/hosts to:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
127.0.0.1:9999  project.play

and use dscacheutil -flushcache. The problem is that I can only access to localhost:57173, when I tried accessing http://project.play:9999, Chrome returns "Oops! Google Chrome could not find project.play:9999".
Can somebody show me where I were wrong? Thank you very much
P/S: When accessing localhost:9999 it returns The server made a boo boo.

© Server Fault or respective owner

Related posts about apache2

Related posts about macosx