nginx subdomains ajp module
LucianaD
nginx-forum at nginx.us
Thu Jul 24 10:09:14 UTC 2014
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
More information about the nginx
mailing list