In httpd.conf, I have
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *.aonesalons.com
ProxyPreserveHost On
# setup the proxy
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
</VirtualHost>
<VirtualHost *:80>
ServerName backend.aonesalons.com
ProxyPreserveHost On
# setup the proxy
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:11000/
ProxyPassReverse / http://localhost:11000/
</VirtualHost>
I intend that requests to all subdomains to go this server be routed to 9000 port except for backend.aonesalons.com which should go to 11000 port.
I tried to make an exception using above rule.
Everything is being routed to port 9000 well. But backend.aonesalons.com is not working.
How do we fix this?
Edit:
<VirtualHost backend.aonesalons.com:80>
ServerName backend.aonesalons.com
ProxyPreserveHost On
# setup the proxy
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:11000/
ProxyPassReverse / http://localhost:11000/
</VirtualHost>
<VirtualHost *:80>
ServerName *.aonesalons.com
ProxyPreserveHost On
# setup the proxy
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
</VirtualHost>
I still get 404 for this