Welcome! Log In Create A New Profile

Advanced

Re: nginx subdomains ajp module

July 24, 2014 06:09AM
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
Subject Author Posted

nginx subdomains ajp module

LucianaD July 24, 2014 05:29AM

Re: nginx subdomains ajp module

mex July 24, 2014 05:34AM

Re: nginx subdomains ajp module

LucianaD July 24, 2014 06:09AM

Re: nginx subdomains ajp module

LucianaD July 24, 2014 06:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready