# Error in nginx-0.8.42: : mkdir() "/usr/local/nginx/uwsgi\_temp" failed

**URL:** <https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741>\
**Category:** NGINX\
**Created:** [June 26, 2010, 9:25am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741 "2010-06-26T09:25:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [June 26, 2010, 9:25am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/1 "2010-06-26T09:25:17Z")

</div>

Up until (at least) nginx-0.8.37 I was able to rebuild the nginx  
Ubuntu package without any problems (I have previously posted in this  
list  
the procedure to rebuild a Debain/Ubuntu package).

Using the nginx-0.8.42.tar.gz sources I am able to build  
a nginx\_0.8.42-0ubuntu1\_i386.deb package that, once installed, gives  
the following error while trying to run nginx:

sudo /usr/sbin/nginx -t  
the configuration file /etc/nginx/nginx.conf syntax is ok  
[emerg]: mkdir() “/usr/local/nginx/uwsgi\_temp” failed (2: No such file  
or directory) configuration file /etc/nginx/nginx.conf test failed

As Debian does not use /usr/local/nginx/, it seems that something  
named UWSGI is not following the file placing rules as it should.

M.

---

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [June 26, 2010, 9:38am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/2 "2010-06-26T09:38:45Z")

</div>

On Sat, Jun 26, 2010 at 11:24 AM, M. Alan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> As Debian does not use /usr/local/nginx/, it seems that something  
> named UWSGI is not following the file placing rules as it should.

Looks like you forgot to pass correct uwsgi-temp-path to configure  
script.

–  
Boris D..

---

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [June 26, 2010, 9:42am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/3 "2010-06-26T09:42:16Z")

</div>

Hi,

> As Debian does not use /usr/local/nginx/, it seems that something  
> named UWSGI is not following the file placing rules as it should.

uWSGI (uwsgi?) follows same rules as client\_body/FastCGI/log/proxy  
paths.  
This means that starting with nginx-0.8.41 you should add  
“–http-uwsgi-temp-path” to the ./configure options and starting with  
nginx-0.8.42 you should also add “–http-scgi-temp-path”.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [August 26, 2010, 2:49am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/4 "2010-08-26T02:49:33Z")

</div>

I had the exact same error using apt-get via  
[http://wiki.nginx.org/NginxInstall](http://wiki.nginx.org/NginxInstall) – In that case, there is no  
configure involved, installation is pretty much automatic.

This extends the “you” who “forgot to pass correct uwsgi-temp-path to  
configure script” I guess. But I don’t know how to report the issue to  
him/her.

BTW: I got by via a “mkdir /usr/local/nginx” but this might be  
unorthodox.

Yours,

```
Jean Hugues

```

Posted at Nginx Forum:

> **[Re: error in nginx-0.8.42: \[emerg\]: mkdir() "/usr/local/nginx/uwsgi\_temp" failed](https://forum.nginx.org/read.php?2,102597,123795#msg-123795)**
>
> Up until (at least) nginx-0.8.37 I was able to rebuild the nginx Ubuntu package without any problems (I have previously posted in this list the procedure to rebuild a Debain/Ubuntu package). Using the nginx-0.8.42.tar.gz sources I am able to build a...

---

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [August 28, 2010, 12:31am UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/5 "2010-08-28T00:31:05Z")

</div>

## serepo Wrote:

> Cheers Sebastiaan

It looks like that PPA has had some problems for the last 12 days.

On 8/12/2010 it built a package successfully but did not include those  
two temp paths.  
Build log:  
[http://launchpadlibrarian.net/53535379/buildlog\_ubuntu-lucid-i386.nginx\_0.8.49-1ppa1\_FULLYBUILT.txt.gz](http://launchpadlibrarian.net/53535379/buildlog_ubuntu-lucid-i386.nginx_0.8.49-1ppa1_FULLYBUILT.txt.gz)

But then again on 8/12/2010 it tried to rebuild with the needed  
options:  
–http-scgi-temp-path=/var/lib/nginx/scgi   
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi   
but failed to build.  
Build log:  
[http://launchpadlibrarian.net/53565334/buildlog\_ubuntu-lucid-i386.nginx\_0.8.49%2Btime~lucid1\_FAILEDTOBUILD.txt.gz](http://launchpadlibrarian.net/53565334/buildlog_ubuntu-lucid-i386.nginx_0.8.49%2Btime~lucid1_FAILEDTOBUILD.txt.gz)

Looks like a naming problem. Package name changed and it applied that  
to the source path and then it couldn’t find the upstream-fair module  
and died.

Please contact the maintainer of the PPA.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,102597,124478#msg-124478](http://forum.nginx.org/read.php?2,102597,124478#msg-124478)

---

<div class="post-metadata">

**Author:** ![MSAlan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@MSAlan](https://www.ruby-forum.com/u/MSAlan)\
**Post date:** [August 27, 2010, 11:56pm UTC](https://www.ruby-forum.com/t/error-in-nginx-0-8-42-mkdir-usr-local-nginx-uwsgi-temp-failed/190741/6 "2010-08-27T23:56:33Z")

</div>

In addition to Jean hughes:

I also installed from the ppa in ubuntu lucid, and created  
/usr/local/nginx  
Then I made the user (& group) www-data, who apparently is created by  
the nginx install package, owner of /usr/local/nginx/ with read & write  
access.  
Start nginx with /etc.init.d/nginx start and youÅ•e ready to go.

Cheers Sebastiaan

Posted at Nginx Forum:

> **[Re: error in nginx-0.8.42: \[emerg\]: mkdir() "/usr/local/nginx/uwsgi\_temp" failed](https://forum.nginx.org/read.php?2,102597,124470#msg-124470)**
>
> Up until (at least) nginx-0.8.37 I was able to rebuild the nginx Ubuntu package without any problems (I have previously posted in this list the procedure to rebuild a Debain/Ubuntu package). Using the nginx-0.8.42.tar.gz sources I am able to build a...
