Re: trouble with static content (SOLVED)

2021-11-08 Thread deeztek
Hi, Thanks a lot for the suggestions. I ended up following your recommendation and I set the /admin location as follows which took care of it. Now I know that you setup a location within a location: location /admin/ { index index.cfm; location ~* .(?:ico|css|js|gif|jpe?g|png|woff2

Re: trouble with static content (Revised)

2021-11-07 Thread Francis Daly
On Sun, Nov 07, 2021 at 11:00:39AM -0500, deeztek wrote: Hi there, > >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 speci

Re: trouble with static content (Revised)

2021-11-07 Thread deeztek
>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

Re: trouble with static content (Revised)

2021-11-07 Thread Francis Daly
On Sun, Nov 07, 2021 at 08:46:17AM -0500, deeztek wrote: Hi there, > So when I say static content, I mean resources such as .css, .js .png, .jpg > etc. Ok, so let's use one "js" request as an example here. In nginx, one request is handled in one location. Only the config

Re: trouble with static content (Revised)

2021-11-07 Thread deeztek
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

Re: trouble with static content (Revised)

2021-11-07 Thread Francis Daly
On Sun, Nov 07, 2021 at 07:01:58AM -0500, deeztek wrote: Hi there, > With the following configuration, I get static content on the /admin > location but NOT the / location: Can you give some specific examples of requests that you make, responses that you get, and responses that you want

trouble with static content (Revised)

2021-11-07 Thread deeztek
I posted about this issue a few days ago, however I fear that I needlessly complicated the question and some of the problems that I encountered were due to browser cache. So, here I go again: With the following configuration, I get static content on the /admin location but NOT the / location

Re: Help with static content

2021-11-03 Thread deeztek
So after some more trial and error, I was able to display static content by including the following: location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2|map)$ { # Some basic cache-control for static files to be sent to the browser expires max; add_header Pragma public

Re: Help with static content

2021-11-03 Thread deeztek
I ran it and there were no problems found. I think there is a misunderstanding. There are no errors in Nginx. Nginx starts with no problem and I'm able to access the application. The only problem is that static content is not being served when I configure and use a FQDN to access the applic

Re: Help with static content

2021-11-03 Thread basti
Check your config with 'nginx -T | less' for 'server_name _'. This is a catch_all as described in the docs. On 02.11.21 22:50, deeztek wrote: > I already tried that with same results. > > Posted at Nginx Forum: > https://forum.nginx.org/read.php?2,292742,292744#msg-292744 > > __

Re: Help with static content

2021-11-02 Thread deeztek
I already tried that with same results. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292742,292744#msg-292744 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Help with static content

2021-11-02 Thread basti
First of all try to add a "server_name". See http://nginx.org/en/docs/http/server_names.html Am 02.11.21 um 20:46 schrieb deeztek: > I'm having a problem with Nginx serving static content (.css, .js, .png, > .jpg etc.). > > In the below configuration, if I access the s

Help with static content

2021-11-02 Thread deeztek
I'm having a problem with Nginx serving static content (.css, .js, .png, .jpg etc.). In the below configuration, if I access the server via IP address static content is served with no problem. However, if I switch to host name, I get a 404 for all static content. === nginx.conf starts

Re: Creating the Directory Structure - static content

2021-02-22 Thread Francis Daly
On Mon, Feb 22, 2021 at 02:12:08PM +, Grzegorz Cześnik wrote: Hi there, > My nginx distribution is from the official nginx repository for Ubuntu 20 > Server > > Default: > location / { > root / usr / share / nginx / html; > index index.html index.htm; > } > > Theref

RE: Creating the Directory Structure - static content

2021-02-22 Thread Grzegorz Cześnik
...@nginx.org] On Behalf Of Francis Daly Sent: Sunday, February 21, 2021 4:17 PM To: nginx@nginx.org Subject: Re: Creating the Directory Structure - static content On Wed, Feb 17, 2021 at 05:05:42PM +, Grzegorz Cześnik wrote: Hi there, > /var/www//public_html > /var/www/html/ >

Re: Creating the Directory Structure - static content

2021-02-21 Thread Francis Daly
On Wed, Feb 17, 2021 at 05:05:42PM +, Grzegorz Cześnik wrote: Hi there, > /var/www//public_html > /var/www/html/ > /var/www/ > > Are there any benefits to using one of these examples? Is it any freedom in > what they write about it? It is "whatever organisation you prefer" -- the nginx app

Creating the Directory Structure - static content

2021-02-17 Thread Grzegorz Cześnik
Hi, I am viewing various tutorials on configuring server blocks. I am wondering about the root directory structure for a server block for some static pages. I wanted to ask what are the best practices on this topic. I found such structure proposals as: /var/www//public_html /var/www/html/ /v

Re: Static content and Front Controller pattern under same base URI

2019-10-18 Thread J.R.
> I'm not a big fan of the location that sets the 418 error_page to the > @foo_front_controller named location, but I don't know of any other way > to essentially do a "return @foo_front_controller". Is there a better > way? Use "try_files" instead with a filename that will never exist (i.e. unde

Static content and Front Controller pattern under same base URI

2019-10-17 Thread J. Lewis Muir
Hello, nginxers! What's the best way to server static content as well as dynamic content that uses the Front Controller pattern under the same base URI? I'm dealing with a web app partially written in PHP that expects to serve static content as well as dynamic PHP content, using

Re: Static Content on Different Server Isn't Loaded??

2015-08-19 Thread Francis Daly
On Tue, Aug 18, 2015 at 01:12:54PM -0400, smsmaddy1981 wrote: Hi there, > This WORKS in reading static content from remote server >location ^~/wkspace/ { > proxy_pass http://citwkspace; >} For the request that works: what does your nginx log say that

Re: Static Content on Different Server Isn't Loaded??

2015-08-18 Thread smsmaddy1981
Hi Francis, One more observation pls. This WORKS in reading static content from remote server location ^~/wkspace/ { proxy_pass http://citwkspace; } This DOESN'T WORK? in reading static content from remote server location ^~/wkspace/agent

Re: Static Content on Different Server Isn't Loaded??

2015-08-17 Thread smsmaddy1981
Hi Francis, There were some HW upgrades because of which I was halted to make anymore trials. Today, I am revoked the access to continue my investigation and with your recent suggestion/tip...I am able to access the static content. Cheers and very kind for your quick support. Best regards

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread smsmaddy1981
Hi Francis Thanks for your quick support, I will revert with my observations. Regards. Maddy Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259786,260714#msg-260714 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/li

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread Francis Daly
On Sun, Aug 02, 2015 at 06:59:03PM -0400, smsmaddy1981 wrote: > "/content/img.jpg" is sepcific to an application and which is deployed on > "ser02". I'm going to guess that you mean "every request that starts with /content/ should be handled by ser02". In that case, your configuration should be l

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread smsmaddy1981
"/content/img.jpg" is sepcific to an application and which is deployed on "ser02". Whenenver an web request is made accessing the application (deployed on ser02)...through upstream configuration...the service responds reaching ser02...but static files (/content/img.jpg) are not rendered. The acces

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread Francis Daly
On Sun, Aug 02, 2015 at 06:36:13PM -0400, smsmaddy1981 wrote: > Answer below pls: > > Nginx is on "ser01" > file is on "ser02" How do you know that /content/img.jpg should be served from ser02, and not from ser01 or ser03? What is special about /content/img.jpg that says "this is on ser02"? (Yo

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread smsmaddy1981
Answer below pls: Nginx is on "ser01" file is on "ser02" //Maddy Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259786,260710#msg-260710 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread Francis Daly
On Sun, Aug 02, 2015 at 05:44:27PM -0400, smsmaddy1981 wrote: Hi there, > Yes, the file/s are located. Verified with all servers. You make a http request for /content/img.jpg. The file /usr/local/nginx/html/content/img.jpg is on one of your five servers. You seem to report that nginx fails to

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread smsmaddy1981
Hi Francis, Yes, the file/s are located. Verified with all servers. Best regards, Maddy Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259786,260708#msg-260708 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinf

Re: Static Content on Different Server Isn't Loaded??

2015-08-02 Thread Francis Daly
On Sat, Aug 01, 2015 at 07:32:42PM -0400, smsmaddy1981 wrote: Hi there, > Issue arises, when trying to access services deployed on other servers > (2,3,4,5). request is reached via upstream servers configured. > Unfortunately, the static content (2,3,4,5) servers are not getting > fe

Re: remote server static content is not getting loaded

2015-08-01 Thread smsmaddy1981
Hi Francis., I have updated my old request http://forum.nginx.org/read.php?2,259786,260695#msg-260695 Awaiting for your response pls. Best regards, Maddy Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260231,260696#msg-260696 ___ nginx mai

Re: Static Content on Different Server Isn't Loaded??

2015-08-01 Thread smsmaddy1981
static data of service 1...as it is deployed on the same server where NGINX is installed. Issue arises, when trying to access services deployed on other servers (2,3,4,5). request is reached via upstream servers configured. Unfortunately, the static content (2,3,4,5) servers are not getting fetched

Re: remote server static content is not getting loaded

2015-07-12 Thread Francis Daly
On Sun, Jul 12, 2015 at 05:09:09PM -0400, smsmaddy1981 wrote: Hi there, > ISSUE: Static content is not loaded from remote server where application is > deployed, rather it is reading from the server where NGinx is installed. http://forum.nginx.org/read.php?2,259786,259821 You do not w

remote server static content is not getting loaded

2015-07-12 Thread smsmaddy1981
Hi, ISSUE: Static content is not loaded from remote server where application is deployed, rather it is reading from the server where NGinx is installed. --- Nginx-1.8.0 is installed (on the server nginx.corp.stel.no) Proxy pass to another

Re: Static content

2015-07-07 Thread smsmaddy1981
Hi Mike Thanks for your quick reply... To answer your questions: - Upstream servers yes (where applications are deployed). And, not NGinx installations. - I tried accessing the static content on other servers, that isn't working... I tried using root, rewrite,.. directives. Is it possib

Re: Static content

2015-06-30 Thread Miguel C
You said it yourself: "And, the above configuration is expecting static content on the server where NGinx is installed, when an request is made. But, I expect the static content to be expected from remote server." Nginx expets the file to be on the server, and that's how it works

Re: Static content

2015-06-30 Thread smsmaddy1981
Hi Mike Thanks for your reply I did not understand your suggestion. Can you please elaborate with an example Regards, Maddy Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259989,260003#msg-260003 ___ nginx mailing list nginx@nginx.org http:/

Re: Static content

2015-06-30 Thread Miguel C
t; resulting in UI with no static content loaded. > > I have tried root, rewrite directives... to specify the static content path > on another server (workspace.corp.test.no), which didn't helped. I might be > wrong with configuration. Pls. assist > > > server {

Static content

2015-06-30 Thread smsmaddy1981
Hi, I have NGinx 1.8.0 installed successfully and configured NGinx... with upstream servers provided. NGinx and Services are deployed on separate machines. Now, when an request is made via NGinx, the service is invoked resulting in UI with no static content loaded. I have tried root, rewrite

Re: Static Content on Different Server Isn't Loaded??

2015-06-23 Thread Francis Daly
On Mon, Jun 22, 2015 at 08:35:32AM -0400, smsmaddy1981 wrote: Hi there, > I have static content available on the remote server (say NODE 02) and PATH: > ../livetest/WEB-INF/static/classes/ > under which I have /image, /js, /styles folders nginx doesn't know about static content

Static Content on Different Server Isn't Loaded??

2015-06-22 Thread smsmaddy1981
Hi Team, I have static content available on the remote server (say NODE 02) and PATH: ../livetest/WEB-INF/static/classes/ under which I have /image, /js, /styles folders I have installed nginx-1.8.0 on server (Say Node 01). While accessing the application, the static contents are not getting

Re: dificulty finding local static content

2015-04-19 Thread Francis Daly
On Sun, Apr 19, 2015 at 02:49:26AM -0400, gariac wrote: Hi there, > Argh! Pilot error! Once I cleared the browser cache, the website works. Good that you found the working system. And thanks for following up, so that the list knows there is no ongoing problem. Cheers, f -- Francis Da

Re: dificulty finding local static content

2015-04-18 Thread gariac
Argh! Pilot error! Once I cleared the browser cache, the website works. Sorry to waste your time. Next time I post, I'll try to have a real problem. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,258175,258189#msg-258189 ___ nginx mailing li

Re: dificulty finding local static content

2015-04-18 Thread Francis Daly
On Fri, Apr 17, 2015 at 10:09:13PM -0400, gariac wrote: Hi there, > Default file local per the debian installation is the website is found at > /usr/share/nginx/www. The html files are located in the www directory. The > index.html renders fine. However, I can't follow links in the page. What

dificulty finding local static content

2015-04-17 Thread gariac
Total newb here so apologies in advance. (Silly me, I could have set up Apache, but I decided to learn something new.) I have an existing website hosted on a server running apache. I am setting up a new server, this one being vitrual and bare bones, i.e. nothing installed but linux. OS is debian.

Re: SPDY + proxy cache static content failures

2013-11-26 Thread ruben.herold
It would be nice to get some more informations about the current status and work. Since RHEL 6.5 / Centos 6.5 there is openssl 1.0.1e available for me and I would like to activate SPDY on our systems. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233497,244983#msg-244983

Re: SPDY + proxy cache static content failures

2013-11-16 Thread spdyg
No unfortunately, but I have since filed a bug in trac: http://trac.nginx.org/nginx/ticket/428 Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233497,244737#msg-244737 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/li

Re: SPDY + proxy cache static content failures

2013-11-14 Thread JStl
Hi, I have the same problem (nginx 1.4.3) when spdy is enabled and proxy cache too (with apache2 behind). Any news about this bug ? I would really like to be able to activate SPDY... Thanks Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233497,244667#msg-244667 _

Re: location problem with static content

2013-10-30 Thread Francis Daly
On Wed, Oct 30, 2013 at 11:15:42AM +0100, Philipp Kraus wrote: > Am 29.10.2013 um 21:30 schrieb Francis Daly : > > On Tue, Oct 29, 2013 at 07:34:15PM +0100, Philipp Kraus wrote: Hi there, There are a few possible different reasons for things not to be working the way you want. The best chance of

Re: location problem with static content

2013-10-30 Thread Philipp Kraus
the filesystem did you want it to serve for that url? The message shows: 2013/10/30 11:10:18 [error] 6692#0: *5 open() "/home/www/static.css" failed (2: No such file or directory), client: , server: , request: "GET /static.css HTTP/1.1", host: "", referrer: "https:

Re: location problem with static content

2013-10-29 Thread Francis Daly
be better off using "$uri/" instead. > I get this error: > > [error] 4573#0: *4 open() "/home/www/static.css" failed (2: No such file or > directory) What url did you access to get this message? What file on the filesystem did you want it to serve for that u

location problem with static content

2013-10-29 Thread Philipp Kraus
with https://myserver/gitlab, most functions of GitLab works well, but I have got a problem with the static content. I get this error: [error] 4573#0: *4 open() "/home/www/static.css" failed (2: No such file or directory) The message is correct, because the main root dir (above the locati

Re: SPDY + proxy cache static content failures

2013-07-24 Thread spdyg
David Gwynne Wrote: --- > i am also experiencing this problem running 1.4.2. Hi David. The response I got from my Valentin off-list was that there is a known incompatibility with SPDY and proxy cache, due to the way proxy cache will kill the con

Re: SPDY + proxy cache static content failures

2013-07-22 Thread David Gwynne
i am also experiencing this problem running 1.4.2. cheers, dlg On 08/04/2013, at 10:16 PM, spdyg wrote: > Thanks Valentin. I have emailed you (off-list) some debug logs / > screenshots. > > Posted at Nginx Forum: > http://forum.nginx.org/read.php?2,233497,238195#msg-238195 > > _

Re: SPDY + proxy cache static content failures

2013-04-08 Thread spdyg
Thanks Valentin. I have emailed you (off-list) some debug logs / screenshots. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233497,238195#msg-238195 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: SPDY + proxy cache static content failures

2013-04-05 Thread Valentin V. Bartenev
On Thursday 04 April 2013 02:43:15 spdyg wrote: > No there's nothing in the error log. Access log shows 304's for all > requests that failed. > Could you provide a debug log for the issue? Here is the guide: http://nginx.org/en/docs/debugging_log.html wbr, Valentin V. Bartenev -- http://ngin

Re: SPDY + proxy cache static content failures

2013-04-03 Thread spdyg
No there's nothing in the error log. Access log shows 304's for all requests that failed. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233497,238073#msg-238073 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinf

Re: SPDY + proxy cache static content failures

2013-04-03 Thread Valentin V. Bartenev
On Wednesday 03 April 2013 02:49:55 spdyg wrote: > Hi guys, > > So perhaps I shouldn't have reused my existing topic and confused things, > sorry! > > I only did so because the symptom is exactly the same as the issue I > originally reported (SOME static conte

Re: SPDY + proxy cache static content failures

2013-04-02 Thread spdyg
Hi guys, So perhaps I shouldn't have reused my existing topic and confused things, sorry! I only did so because the symptom is exactly the same as the issue I originally reported (SOME static content served from proxy cache occasionally doesn't make it to Firefox when using SPDY