location settings for Django Uwsgi Nginx Configuration for production
Francis Daly
francis at daoine.org
Sat Sep 16 10:43:49 UTC 2017
On Fri, Sep 15, 2017 at 08:29:20AM -0400, sandyman wrote:
Hi there,
> **server {
> server_name sandyman.xyz www.sandyman.xyz ;
> location /static {
> alias /home/sandyman/production/django_project/assets/;
> }
> }**
> ** GET Request **
>
> Request URL:http://www.sandyman.xyz/static/css/bootstrap.min.css
> Request Method:GET
> **Status Code:404 NOT FOUND**
>
> file bootstrap is located in
>
> /home/sandyman/production/django_project/assets/css/bootstrap.min.css
That nginx config with that request for that url, works for me --
http 200 with the content of the file.
If there is nothing in nginx logs, that suggests that maybe you are not
connecting to the ip:port that uses this config; or perhaps that there
is more config that is relevant that you are not showing.
You can prove that you are using the config that you think by, for
example, adding a snippet like
location = /test-this/ { return 200 "Yes, this is correct\n"; }
and then requesting http://www.sandyman.xyz/test-this/
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list