Welcome! Log In Create A New Profile

Advanced

Re: location settings for Django Uwsgi Nginx Configuration for production

Francis Daly
September 16, 2017 06:46AM
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@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

location settings for Django Uwsgi Nginx Configuration for production

sandyman September 15, 2017 08:29AM

Re: location settings for Django Uwsgi Nginx Configuration for production

itpp2012 September 15, 2017 08:38AM

Re: location settings for Django Uwsgi Nginx Configuration for production

sandyman September 15, 2017 09:43AM

Re: location settings for Django Uwsgi Nginx Configuration for production

itpp2012 September 15, 2017 01:44PM

Re: location settings for Django Uwsgi Nginx Configuration for production

Francis Daly September 16, 2017 06:46AM

Re: location settings for Django Uwsgi Nginx Configuration for production

sandyman September 17, 2017 09:16AM

Re: location settings for Django Uwsgi Nginx Configuration for production

sandyman September 17, 2017 10:49AM

Re: location settings for Django Uwsgi Nginx Configuration for production

Francis Daly September 17, 2017 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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