When /var/tmp is mounted using tmpfs, it starts with clean contents each time the system boots. Nginx from ports requires a directory inside /var/tmp which is created when the port is installed. But since the Nginx script do not check or recreate that dir, it will fail to start giving this message. Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: [emerg] mkdir() "/var/tmp/nginx/client_body_temp" failed (2: No such file or directory) nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed Starting nginx. nginx: [emerg] mkdir() "/var/tmp/nginx/client_body_temp" failed (2: No such file or directory) /usr/local/etc/rc.d/nginx: WARNING: failed to start nginx Fix: Maybe not the best place, but I added 3 lines in the nginx init script to check and create the needed directory if it's missing. I added the 3 lines to the nginx_checkconfig function. nginx_checkconfig() { if [ ! -d "/var/tmp/nginx" ] ; then mkdir /var/tmp/nginx fi ... I included a patch that make the changes. Patch attached with submission follows: How-To-Repeat: 1. Mount /var/tmp as tmpfs My current fstab line is: tmpfs /var/tmp tmpfs rw,nosuid,noexec,mode=01777 0 0 2. Reboot the system or start Nginx.
Responsible Changed From-To: freebsd-ports-bugs->osa over to maintainer
State Changed From-To: open->closed I committed my version, thank you for report!