Open androidLaLa opened 8 years ago
It might be an issue with the nuget I guess.. I have the same issue... and i checked the $_Files object and it is completely empty. ( I am using apache to host)
Resolved using this Nginx config:
Example of an Nginx configuration for Simple NuGet Server
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html/simple-nuget-server/public/;
rewrite ^/$ /index.php;
rewrite ^/\$metadata$ /metadata.xml;
rewrite ^/Search\(\)/\$count$ /count.php;
rewrite ^/Search\(\)$ /search.php;
rewrite ^/Packages\(\)$ /search.php;
rewrite ^/Packages\(Id='([^']+)',Version='([^']+)'\)$ /findByID.php?id=$1&version=$2;
rewrite ^/GetUpdates\(\)$ /updates.php;
rewrite ^/FindPackagesById\(\)$ /findByID.php;
# NuGet.exe sometimes uses two slashes (//download/blah)
rewrite ^//?download/([^/]+)/([^/]+)$ /download.php?id=$1&version=$2;
rewrite ^/([^/]+)/([^/]+)$ /delete.php?id=$1&version=$2;
# NuGet.exe adds /api/v2/ to URL when the server is at the root
rewrite ^/api/v2/package/$ /index.php;
rewrite ^/api/v2/package/([^/]+)/([^/]+)$ /delete.php?id=$1&version=$2;
#location ~ \.php$ {
# include fastcgi_params;
# fastcgi_pass php;
#}
#location = /index.php {
# dav_methods PUT DELETE;
# include fastcgi_params;
# fastcgi_pass php;
# # PHP doesn't parse request body for PUT requests, so fake a POST.
# fastcgi_param REQUEST_METHOD POST;
# fastcgi_param HTTP_X_METHOD_OVERRIDE $request_method;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
dav_methods PUT DELETE;
include snippets/fastcgi-php.conf;
include fastcgi_params;
# With php7.0-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
#fastcgi_param REQUEST_METHOD POST;
#fastcgi_param HTTP_X_METHOD_OVERRIDE $request_method;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_param REQUEST_METHOD POST;
fastcgi_param HTTP_X_METHOD_OVERRIDE $request_method;
#fastcgi_index index.php;
}
# Used with X-Accel-Redirect
location /packagefiles {
internal;
root /var/www/html/simple-nuget-server/;
}
index index.html index.htm index.nginx-debian.html index.php;
}
public/push.php file did not receive $_FILES['package'] => array(0){}
I've installed on my server.
and setting up nginx.conf file like
is it wrong configuration?
"fastcgi_pass php" to error on my server like this
so
I've edited "fastcgi_pass php" to "fastcgi_pass 127.0.0.1:9000" also added fastcgi_param SCRIPT_FILENAME $documentRoot/$fastcgi_script_name;
any solution?