Welcome! Log In Create A New Profile

Advanced

Re: trouble with static content (Revised)

November 07, 2021 08:46AM
Hi,

So when I say static content, I mean resources such as .css, .js .png, .jpg etc.

so, with the following in place:

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

Requests to the / location, I get 404s:

GET https://host.domain.tld/static/js/vendor.d0bc79df.js net::ERR_ABORTED 404 (Not Found)
GET https://host.domain.tld/static/css/index.393eb37d.css net::ERR_ABORTED 404 (Not Found)

However requests to the /admin location all work. Also I forgot to add that the following:

root /var/www/html;

must also be present the server block before the /admin location works, which I think is odd because I have the:

root /var/www/html/;

in the /admin location.

Anyways, if I remove the following:

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

Requests to the /admin location, I get 404s:

GET https://192.168.10.145/admin/fusion.css net::ERR_ABORTED 404
GET https://host.domain.tld/:142 GET https://192.168.10.145/admin/style.css net::ERR_ABORTED 404
GET https://host.domain.tld//:143 GET https://192.168.10.145/admin/site.css net::ERR_ABORTED 404
GET https://host.domain.tld//:232 GET https://192.168.10.145/admin/hermes_seg_menu2.js net::ERR_ABORTED 404
GET https://host.domain.tld//:349 GET https://192.168.10.145/admin/help.png 404
GET https://host.domain.tld//:232 GET https://192.168.10.145/admin/hermes_seg_menu2.js net::ERR_ABORTED 404
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: 309
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