Welcome! Log In Create A New Profile

Advanced

Re: nginx and tomcat integrated but how to serve static files

Francis Daly
December 11, 2012 07:28AM
On Tue, Dec 11, 2012 at 02:18:27PM +0530, Irfan Khan wrote:

Hi there,

> My config is same as earlier. I had tried to access /foo/learning.html from
> Nginx. But if I keep tomcat server off then I am unable to load this page.

If you use the config you posted in the first mail, /foo/learning.html
should give you the file /var/www/nginx-default/foo/learning.html, and
should not involve tomcat at all (so shouldn't change whether tomcat is
on or off).

Does it give you that file?

If not, what does it give you instead?

Probably best is to copy-paste the output of

curl -i http://192.168.0.16/foo/learning.html

if it is not what you want it to be.

The later mails, including this one, don't appear to include any other
valid nginx config.

> If I keep tomcat server up and try for some files (blah.html)which is not
> exists then tomcat reports an error on page.

curl -i http://192.168.0.16/blah.html

should show you the file /var/www/nginx-default/blah.html, or an nginx
http 404 message.

curl -i http://192.168.0.16/abc/blah.html

should show you whatever tomcat produces, if you use your original
configuration; or should show you the content of (probably)
/usr/local/nginx/html/abc/blah.html, if you add the change suggested.

> I have also tried giving full access to webapps directive just for testing
> purpose. Nothing worked!

I want to use the nginx config that you provide, to reproduce the error
that you report.

So far, I can't.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

RE: nginx and tomcat integrated but how to serve static files

irfee December 07, 2012 06:10AM

Re: nginx and tomcat integrated but how to serve static files

aweber December 07, 2012 08:44AM

Re: nginx and tomcat integrated but how to serve static files

Francis Daly December 07, 2012 11:02AM

RE: nginx and tomcat integrated but how to serve static files

irfee December 10, 2012 11:26AM

Re: nginx and tomcat integrated but how to serve static files

Francis Daly December 10, 2012 02:50PM

RE: nginx and tomcat integrated but how to serve static files

irfee December 11, 2012 03:50AM

Re: nginx and tomcat integrated but how to serve static files

Francis Daly December 11, 2012 07:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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