apache - HTTP Requests going to wrong VirtualHost apache2 -
hoping can lend me hand here has been bugging me few days now.
i have apache config file, both standard http server work reverse proxy pages within network.
if create new dns record ip address of apache server automatically send request camera1.domainname.com virtual host , forward me 192.168.2.160.
what want to send folder /var/www/bad_url.
any suggestions here great im pretty sure im going start loosing hair.
namevirtualhost *
errorlog ${apache_log_dir}/error_baduri.log customlog ${apache_log_dir}/access_baduri.log combined documentroot /var/www/bad_url
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
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
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
all above in file 'etc/apache2/sites-enabled/default.conf'. there no other config files in folder.
im running ubuntu
just quickly. seems order matters. long have wild card top went there first unless virtual host matched criteria. weird.
Comments
Post a Comment