New answers tagged

1

Short answer: you need some form of seperate django server, yes. Long answer: nginx itself can only serve static files. It can read any file on your server and send it out via HTTP, but that is it. It does not speak PHP, Python, Java, ... by itself. If you would point nginx to a python file, it would just treat it as a text file and display the source code, ...


0

I would bet that you have one query which is particularly slow. When this runs the connections pile up behind it. I'd start by identifying the problematic query and then figure out how to fix it.


1

My initial thoughts would be to check permissions on each level of the directory structure. It appears that at some point one of the directories does not provide permissions to the apache user which would be executing the django code. There are a lot of really fantastic posts about this topic already, you may find this one helpful. ...


0

Hm, I think I've found solution: just replace this wsgi-file = dashboard/wsgi.py to this module = dashboard.wsgi:application


0

I finally found a way to fix this. I removed the .. from STATIC_ROOT STATIC_ROOT = os.path.join(BASE_DIR, 'static/') STATIC_URL = '/static/'


0

You will need to set the "Cache-Control" meta-tag info in Azure Storage/blob. I use AWS and there I can go to the specific asset ( your images ) and specify that info. Also; you should be able to specify this setting if you are using some kind of api to upload images from your application.


0

It seems that the problem is the extra $ in the rewrite rule (in the first argument). I removed it and it has started working fine. location /test { rewrite ^/test/(.*) /$1 break; proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header ...


1

The first modification needed is to the /etc/uwsgi/sites/firstsite.ini file. The only change needed is replacing the permissions from 664 to 666. The script would look like this: [uwsgi] project = firstsite base = /home/user chdir = %(base)/%(project) home = %(base)/Env/%(project) module = %(project).wsgi:application master = true processes = 5 socket = ...


0

I got the same need myself and the easiest solution I found out was to use as mentioned telnet to connect to the management interface(you'll have to add :management localhost 6666, in the server config file) . To get the exact number of client you can do : telnet localhost 6666 status Then you'll get lot of logs : ...


3

If this isn't you, then it must be somebody else... It's common for the web to have Bots, Spiders and Crawlers. Check your log files for the IP to see where the request is coming from. These crawlers usually just use "common" URL paths in the hope that you're using them. If they are just crawling you, then that is not an immediate security threat. But if ...


0

You need to setup multiple server blocks and define a root path for each. Do this inside your nginx config file. server { listen 80; server_name www.domain1.com; root /x.x.x.x/dir1/; index index.html index.htm index.php; // other configurations } server { listen 80; server_name www.domain2.com; ...



Top 50 recent answers are included