HTTP Requests going to wrong VirtualHost apache2 <p>Hoping someone can lend me a hand here as this has been bugging me for a few days now.</p> <p>I have a apache config file, it does both standard HTTP server work as well as reverse proxy for pages within the network. </p> <p>If i create a new DNS A record for the IP address of the apache server it will automatically send the request to the camera1.domainname.com virtual host and then forward me 192.168.2.160. </p> <p>What i want it to to do is send it to the folder /var/www/bad_url.</p> <p>Any suggestions here would be great as im pretty sure im going to start loosing hair.</p> <pre><code>NameVirtualHost * </code></pre> <p></p> <pre><code>ErrorLog ${APACHE_LOG_DIR}/error_baduri.log CustomLog ${APACHE_LOG_DIR}/access_baduri.log combined DocumentRoot /var/www/bad_url </code></pre> <p></p> <p></p> <pre><code>ProxyPreserveHost On ErrorLog ${APACHE_LOG_DIR}/error_cam1.log CustomLog ${APACHE_LOG_DIR}/access_cam1.log combined LogLevel debug ProxyPass / http://192.168.2.160/ ProxyPassReverse / http://192.168.2.160/ ServerAlias camera1.domainname.com </code></pre> <p></p> <p></p> <pre><code>ProxyPreserveHost On ErrorLog ${APACHE_LOG_DIR}/error_mediaserver.log CustomLog ${APACHE_LOG_DIR}/access_mediaserver.log combined LogLevel debug ProxyPass / http://192.168.2.207/ ProxyPassReverse / http://192.168.2.207/ ServerAlias mediaserver.domainname.com </code></pre> <p></p> <p></p> <pre><code>ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ServerAlias ubuntu1 ubuntu1.domainname.com 192.168.2.208 DocumentRoot /var/www/html </code></pre> <p></p> <p>All the above is in file 'etc/apache2/sites-enabled/default.conf'. There are no other config files in that folder.</p> <p>Im running Ubuntu</p>