Welcome! Log In Create A New Profile

Advanced

Re: trouble with static content (Revised)

November 07, 2021 11:00AM
>The config above says that nginx should serve something like the file
>/usr/local/nginx/html/static/js/vendor.d0bc79df.js in response to the
>first request. The actual response is a 404. Does that file exist?

The specific /static/js/vendor.d0bc79df.js files does not exist in /usr/local/nginx/html directory. It's served by the service http://127.0.0.1:9091 and I don't know exactly the path in that service. All I can see is the /static/js/vendor.d0bc79df.js request.

To expand further, the /static/js/vendor.d0bc79df.js works when I remove the following from the config:

location ~* .(?:ico|css|js|gif|jpe?g|png|woff2|map)$ {
expires max;
}

To give you a bit of background. The /admin location is served by Lucee/CFML server running on Tomcat on port 8888. Everything I read says to include the following location in order for Nginx to serve .ico, .css. js etc files:


location ~* .(?:ico|css|js|gif|jpe?g|png|woff2|map)$ {
expires max;
}


Please see here: http://dnando.github.io/blog/2015/01/05/advantages-of-nginx/

So, when I include the location ~* the application that lives on port 8888 works fine, HOWEVER, the application that lives on 9091 breaks. If I remove:


location ~* .(?:ico|css|js|gif|jpe?g|png|woff2|map)$ {
expires max;
}

Then, the application that lives on port 9091 works but the application on port 8888 breaks.

So, the way I'm figuring, I need a way to specify a /admin specific location for static files (.ico, .css, .js etc) since they are not being served by Nginx unless I have a specific directive for those type of files for the application in the /admin location.

Hope that makes more sense.
Subject Author Posted

trouble with static content (Revised)

deeztek November 07, 2021 07:01AM

Re: trouble with static content (Revised)

Francis Daly November 07, 2021 08:24AM

Re: trouble with static content (Revised)

deeztek November 07, 2021 08:46AM

Re: trouble with static content (Revised)

Francis Daly November 07, 2021 10:08AM

Re: trouble with static content (Revised)

deeztek November 07, 2021 11:00AM

Re: trouble with static content (Revised)

Francis Daly November 07, 2021 12:30PM

Re: trouble with static content (SOLVED)

deeztek November 08, 2021 06:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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