views:

40

answers:

1

My web-app is located in mysite.com:8080. I want to access to it by typing webapp.mysite.com.

So, I followed these steps:

1)Enable needed modules:

a2enmod proxy a2enmod proxy_http

apache2 restart

2)Create /etc/apache2/sites-available/mysite

<VirtualHost *:80>
    ServerName webapp.mysite.com
    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPass / http://mysite.com:8080/
    ProxyPassReverse /  http://mysite.com:8080/
    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

3) Modify /etc/apache2/ports.conf

NameVirtualHost *:80
Listen 80

I'm used this settings some days and all be good. But after reloading server, in webapp.mysite.com , I got:

Proxy Error

The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /.

Reason: DNS lookup failure for: mysite.com

Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0 Server at webapp.mysite.com Port 80

Help me, how can I fix it?

A: 

Use the IP address instead.

Maxwell Troy Milton King
Thank's man! It fixed my problem
swdalex

related questions