I've migrated an OpenAtrium site from Apache to an NGINX server using spawn-fcgi.
I've set my max_uploads and max_post size in php.ini, and made adjustments to the user permissions as far as upload file sizes.
I've tested this issue using the same site and database with Apache, and don't have any upload issues.
Here is the error I get:
The selected file 8mbfile.txt could not be uploaded. The file is 8 MB which would exceed your disk quota of 9 MB.As you can see, my file upload size set in my php.ini is 9MB.
I've added client_max_body_size 100m; to my main nginx.conf file.
This site is a virtual host site with its own configuration file:
server {
server_name www.dev.mysite.org;
rewrite ^/(.*) $scheme://dev.mysite.org/$1 permanent;
}
server {
server_name dev.mysite.org;
access_log /var/log/nginx/dev.mysite.org-access.log;
error_log /var/log/nginx/dev.mysite.org-error.log;
root /usr/share/nginx/html/dev.mysite.org; ## <-- Your only path reference.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# This matters if you use drush
location = /backup {
deny all;
}
# Very rarely should these ever be accessed outside of your lan
#location ~* \.(txt|log)$ {
location ~* \.log$ {
allow 127.0.0.1;
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
location / {
# This is cool because no php is touched for static content
try_files $uri @rewrite;
}
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fcgi.sock;
}
#location ~ ^/sites/.*/files/imagecache/ {
# try_files $uri $uri/ @rewrite;
#}
location ~* /files/imagecache/ {
access_log off;
try_files $uri @dev-ngaiost; #imagecache support - now it works
rewrite ^/(.*)$ /index.php?q=$1 last;
}
# Catch image styles for D7 too.
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
location ~* ^.+\.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
# The git web-based repo viewer
location /gitphp {
index index.php index.html index.htm;
}
# The R3 Mediawiki installation
location /wiki {
index index.php index.html index.htm;
}
}
Is this an NGINX issue? I'm lead to think it is because it works fine using apache. Am I missing something?
