Hello,
i tried to use nginx as a reverse proxy for tomcat and jboss application
(that live on other servers) , using subdomains (eg. app1.domain.com,
app2.domain.com etc), but, unfortunatelly, tomcat and jboss application
have
some problems with it (using subdomains there’s no way to make jsp
available) … so I decided to try the ajp_module.
Now, I’ve installed it and seems to work but I’m not able to configure
subdomains for the apps.
Any suggestion?
Thanks
Luciana
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252011,252011#msg-252011
can you post your config please?
beside this, is there a reason you stick to AJP-connector? iirc this is
not
a default-module for nginx,
and on my testing i found the HTTP-connector as fast as AJP, but working
kind of smoother
for tomcat-appservers
regards,
mex
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252011,252013#msg-252013
Hi,
of course!
I’ve used the standard package (the one I install with apt-get on ubuntu
server) and I made this configuration:
upstream tomcat_server {
server tomcat.domain.com:8080;
}
server{
listen 80;
server_name app1.domain.com;
location / {
proxy_pass http://tomcat_server/app1/;
sub_filter /app1/ /;
}
}
to use subdomains, but the application didn’t work properly: once I did
login, the user session wasn’t loaded , so I couldn’t use it (after
login, I
saw alway the login page with some parts of other pages) , so someone
adviced me to use ajp connector.
I’ve installed again nginx without the use of apt-get and now my
configuration is:
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
upstream tomcat {
server tomcat.domain.com:8009;
keepalive 20;
}
server {
listen 80;
server_name app1.domain.com;
location / {
ajp_keep_conn on;
ajp_pass tomcat/app1/;
}
}
}
but I don’t know how to configure it to have something like
app1.domain.com
and check if it works.
With this config, when I go on app1.domain.com, I see the main page of
tomcat server
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252011,252016#msg-252016
LucianaD Wrote:
server{
did login, the user session wasn’t loaded , so I couldn’t use it
server tomcat.domain.com:8009;
ajp_pass tomcat/app1/;
}
}
}
but I don’t know how to configure it to have something like
app1.domain.com and check if it works.
With this config, when I go on app1.domain.com, I see the main page of
tomcat server
I have to add (I don’t find the Edit button
) that I have to use
subdomains for jboss application too and I have a problem with those
apps …
in that case, with the use of subdomains I cannot see the login pages
ever.
I apologize for my english, I hope what I wrote would be understandable
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252011,252017#msg-252017