Two DNS Names for two Web apps in jboss 7.1.1

后端 未结 1 1930
南方客
南方客 2021-01-26 02:50

I have a problem. I have two web apps deployed as wars. Let\'s call them app1.war and app2.war.

I would like app1.war to be accessed at the URL www.website.com and I wou

相关标签:
1条回答
  • 2021-01-26 03:21

    You need to put Apache Http server between user and JBoss server and not access your server directly from web. Configure Apache HTTP server to use mod_proxy with virtual host configuration. If your JBoss server runs on http://localhost:8080, it will look something like this in httpd.conf.

    NameVirtualHost *:80
    
    <VirtualHost *:80>
        RewriteEngine On
        ServerName www.website.com
        ProxyPass / http://localhost:8080/app1/
        ProxyPassReverse / http://localhost:8080/app1/
    </VirtualHost>
    
    <VirtualHost *:80>
        RewriteEngine On
        ServerName www.anotherweb.com
        ProxyPass / http://localhost:8080/app2/
        ProxyPassReverse / http://localhost:8080/app2/
    </VirtualHost>
    
    0 讨论(0)
提交回复
热议问题