Giter Club home page Giter Club logo

Comments (2)

btoda avatar btoda commented on August 12, 2024

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)

from simple-nuget-server.

roman-miniailov avatar roman-miniailov commented on August 12, 2024

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;
}

from simple-nuget-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.