WebFaction
Community site: login faq

I am trying to create an instance of nginx however when I cannot get the error log directory to change from /var/log/nginx/error.log to a directory in my user space. So I cannot start it since does not have write permission to this directory. I am using the configuration below, please let me know of any suggestions.

./configure \
  --prefix=$HOME/webapps/django/nginx \
  --sbin-path=$HOME/webapps/django/nginx/sbin/nginx \
  --conf-path=$HOME/webapps/django/nginx/nginx.conf \
  --error-log-path=$HOME/logs/user/nginx/error.log \
  --pid-path=$HOME/webapps/django/nginx/run/nginx/nginx.pid  \
  --lock-path=$HOME/webapps/django/nginx/lock/nginx.lock \
  --with-http_flv_module \
  --with-http_gzip_static_module \
  --http-log-path=$HOME/webapps/django/nginx/log/nginx/access.log \
  --http-client-body-temp-path=$HOME/webapps/django/nginx/tmp/nginx/client/ \
  --http-proxy-temp-path=$HOME/webapps/django/nginx/tmp/nginx/proxy/ \
  --http-fastcgi-temp-path=$HOME/webapps/django/nginx/tmp/nginx/fcgi/

nginx.conf:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    access_log   ~/logs/user/access_django.log combined;
    error_log   ~/logs/user/error_django.log;

    include mime.types;
    sendfile on;

    server {
        listen port;

        location / {
            include uwsgi_params;
            uwsgi_pass unix:~/webapps/django/uwsgi.sock;
        }
    }
}

asked 31 Mar, 01:57

kthurmond's gravatar image

kthurmond
111
accept rate: 0%


I'm not sure that nginx will expand a tilde ~ to get the path to your log files and sockets. Try using the full path in nginx.conf, eg /home/your_username/logs/user/access_django.log, /home/your_username/webapps/django/uwsgi.sock, etc.

Hope that helps!

permanent link

answered 31 Mar, 16:19

seanf's gravatar image

seanf ♦♦
11.9k21333
accept rate: 37%

I tried that, my current configurations use the full path. Thanks.

(31 Mar, 16:21) kthurmond kthurmond's gravatar image

Hmm, ok then, please open a support ticket and we'll be happy to take a closer look.

(31 Mar, 16:24) seanf ♦♦ seanf's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×888
×183
×17

question asked: 31 Mar, 01:57

question was seen: 640 times

last updated: 31 Mar, 16:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM