Apache redirecting to a specific port
Hi all,
all same machine. I have an apache webserver using VirtualHosts. I have a Node server running on port 8080. What i would like is to have my domain api.domain.com redirect to xx.xx.xx.xx:8080 I would like this to have a clean url that hits my node server. TIA, Tony |
Hi,
You can define the vhost api.domain.com as a reverse proxy of the node server, i.e use something like the following: Code:
<VirtualHost *:80> |
Thank you for your reply. I have changed my httpd to this:
<VirtualHost xx.xx.xx.xx:80> ServerName api.domain.com ProxyRequests Off ProxyPass / xx.xx.xx.xx:8080/ ProxyPassReverse / xx.xx.xx.xx:8080/ </VirtualHost> and i get: Syntax error on line 1021 of /etc/httpd/conf/httpd.conf: ProxyPass URL must be absolute! Any ideas? Thanks :) |
My bad. It should be:
Code:
ProxyPass / http://xx.xx.xx.xx:8080/ |
Im sorry.. I should i tried that! :) Thank you sir! Im up and running !! you guys rock!
|
All times are GMT -5. The time now is 07:18 PM. |