I have a nginx reverse proxy to forward requests to various Apache websites
behind it. This all seems to work fine unless I remove one of the proxy_pass
configurations from nginx. Even though I remove it, nginx still fowards the
requests back to Apache to a seemingly random website this time.
I
Here's an example config that I use:
server {
server_name domain.tld www.domain.tld;
add_header Strict-Transport-Security "max-age=31536000; preload";
keepalive_timeout 70;
#LOGS CONFIG
access_log
Sorry maybe I am confusing you. The config file that I posted, works fine.
What I request actually responds. So, if I were to request www.domain.tld,
the Apache server behind Nginx responds with the correct website for
www.domain.tld. However, if I were to delete the config file for domain.tld
okay that explains it. I appreciate that. So, a default config with the
following:
server {
listen 80 default_server;
return 444;
}
Should take care of it?
How would I got about doing a default SSL config since it would complain
about the certificate?
Thanks
Posted at
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
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 here ===
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
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;
>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
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
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:
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 ~*
12 matches
Mail list logo