My web application is at mysite.com:8080. I want to access it by typing webapp.mysite.com.
So, I have completed the following steps:
1) Enable the necessary modules:
a2enmod proxy a2enmod proxy_http
restart apache2
2) Create / etc / apache 2 / 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) Change / etc / apache 2 / ports.conf
NameVirtualHost *:80
Listen 80
I have been using these settings for several days and everything will be fine. But after rebooting the server, in webapp.mysite.com, I got:
Proxy error
The proxy received an invalid response from the upstream server. proxy could not process request GET /.
Reason: DNS lookup error 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
, ?