सेवा नहीं करता है मैं उबंटू सर्वर 9.04 पर Django चला रहा हूँ।Nginx स्थिर
Django में अच्छी तरह से काम करता है, लेकिन nginx स्टैटिक फ़ाइलें वापस नहीं करता है - हमेशा 404.
यहाँ config है:
server {
listen 80;
server_name localhost;
#site_media - folder in uri for static files
location /static {
root /home/user/www/oil/oil_database/static_files;
autoindex on;
}
#location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov) {
# root /home/user/www/oil/oil_database/static_files;
# access_log off;
# expires 30d;
#}
location/{
root html;
index index.html index.htm;
# host and port to fastcgi server
#fastcgi_pass 127.0.0.1:8080;
fastcgi_pass unix:/home/user/www/oil/oil_database/oil.sock;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
access_log /var/log/nginx/localhost.access_log;
error_log /var/log/nginx/localhost.error_log;
}
Nginx संस्करण 0.6.35 है।
सभी निर्देशिकाएं मौजूद हैं और 777 (डिबगिंग पैरानोआ) बनाई गई हैं। जब मैंने इसे अस्वीकार किया तो टिप्पणी-आउट ब्लॉक मदद नहीं करता है।
serverfault.com – ChristopheD
srry पर अंतर्गत आता है, मैं क्या आपका मतलब है – DataGreed