Issue
I have VPS and currently i am running 5 Spring boot applications on that server along with httpd
.
all html for those applications are inside their respective jars. All of them having different domain names. So after hitting the dns name it should automatically go that port application, right now i need to specify the port number explicitly like example.com:9090
i tried virtual host in httpd.conf but its not working.
Listen 9001
<VirtualHost *:9001>
ServerAdmin admin@admin.askcomputers.co.in
DocumentRoot /var/www/html/example2.com
ServerName www.example2.com
</VirtualHost>
Solution
I think you should make sure that you have the proper modules installed for httpd:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Then I think you should have 5 VirtualHost sections with reverse proxy setup:
<VirtualHost www.example1.com:80>
ServerAdmin admin@admin.askcomputers.co.in
ServerName www.example1.com
ProxyRequests Off
ProxyPass / http://localhost:9090
ProxyPassReverse / http://localhost:9090
</VirtualHost>
...
<VirtualHost www.example5.com:80>
ServerAdmin admin@admin.askcomputers.co.in
ServerName www.example5.com
ProxyRequests Off
ProxyPass / http://localhost:9094
ProxyPassReverse / http://localhost:9094
</VirtualHost>
Answered By - DaShaun Answer Checked By - Willingham (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.