prava

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
location /static/ {
root /home/ihor/lightning_sys/lightning/app/;
expires 1y;
}
location /media/ {
root /home/4kpt/Projects/lightning_sys/lightning/app/;
sudo nano /etc/nginx/conf.d/nginx.conf
cd ~/Projects/lightning_sys
sudo groupadd webb
sudo usermod -a -G webb nginx
sudo usermod -a -G web ihor
sudo chown -R ihor:webb . -R
sudo chmod 644 . -R
sudo chmod 755 ~
sudo chmod 755 ~/Projects/
sudo chmod 755 ~/Projects/lightning_sys/
sudo find . -type d -exec chmod 755 {} +
sudo find . -type f -exec chmod 644 {} +
sudo mkdir
sudo mkdir /run/sockets
sudo chown -R ihor:webb /run/sockets -R
sudo chmod 755 /run/sockets -R
sudo nginx -s reload
cd lightning/
workon ligth
uwsgi uwsgi.ini
http://localhost/
Если не пашет то
sudo cat /var/log/nginx/error.log