Welcome! Log In Create A New Profile

Advanced

nginx + tomcat + jforum how to rewrite.

Posted by conlele 
nginx + tomcat + jforum how to rewrite.
May 25, 2010 07:23AM
Hello all,

my server setup nginx + tomcat + jforum.

when open request uri http://i7network.net/forums/show/1.i7;jsessionid=F9BE4B8A5DE82D6045BFDAEA41DA8473

nginx error : files not found.

but i open uri with port tomcat 8080

http://i7network.net:8080/forums/show/1.i7;jsessionid=F9BE4B8A5DE82D6045BFDAEA41DA8473

it running.

how to fix it ?you have any recommend to fix, please post here.

Thank you read.



Edited 1 time(s). Last edit at 05/25/2010 07:24AM by conlele.
Re: nginx + tomcat + jforum how to rewrite.
June 07, 2010 03:18PM
You would need to send the requests to tomcat, something like this:

location /forums {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
}

You can find documentation for proxy settings here:
http://wiki.nginx.org/NginxHttpProxyModule
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
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