i have domain www.example.com, i'm using glassfish, hosts application @ port 12544.
so wonder 2 things :
how can redirect
www.example.com:12544www.example.com?and same way
https? mean,https://www.example.com?
i new glassfish appreciated.
the best way place glassfish behind apache http server , configure apache point requests glassfish. therefore http requests handled apache , www.example.com requests pointed www.example.com:12544 internally. below brief explanation of how this.
- install glassfish 3+ (make sure listener created , activated on 8009 ,
jkenabled) - install apache (2.2+)
- get mod_jk connector , place apache modules folder configurations.
- create
worker.propertiesfile , place apache conf folder. should contain following properties:
worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009
- open
httpd.conffile in apache conf folder , place following commands (outside virtual host):
loadmodule jk_module modules/mod_jk.so #location of worker file jkworkersfile conf/worker.properties #where put jk logs jklogfile logs/mod_jk.log #log level [deug/error/info] jkloglevel debug #log format jklogstampformat "[%a %b %d %h:%m:%s %y]" # indicate send ssl key size jkoptions +forwardkeysize +forwarduricompat -forwarddirectories # set request format jkrequestlogformat "%w %v %t" # send jsp requests glassfish jkmount /*.jsp worker1 # send webapp requests glassfish jkmount /* worker1
you need add virtualhost section in conf file. maps domain path in glassfish apache able see it. following tells apache map /myapp/* links glassfish
<virtualhost 111.111.111.111:80> serveradmin admin@domain servername domain jkmount /myapp/* worker1 </virtualhost> note: if glassfish listener not created can created cmd using glassfish asadmin following command:
asadmin create-network-listener --protocol http-listener-1 --listenerport 8009 --jkenabled true jk-connector - restart apache , glassfish new configurations updated. apache should see glassfish on port 80.
www.example.com:12544served onwww.example.com.
Comments
Post a Comment