Giter Site home page Giter Site logo

simple-nuget-server's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-nuget-server's Issues

Automated docker builds

Hi,

Thanks for the awesome repo. I tried 2 other linux capable products and yours is by far the most complete.

I automated the docker building and packaging of simple-nuget-server

The repo is here: https://github.com/rolfwessels/docker-simple-nuget-server
Docker files are here: https://hub.docker.com/r/rolfwessels/docker-simple-nuget-server/

If you are happy to share some dockerhub and travis access (or I can show you how) I will be happy to create a PR that includes this automation into this repo.

Thanks again

Rolf

nuget push replies Failed to process request. 'No package file'

public/push.php file did not receive $_FILES['package'] => array(0){}

I've installed on my server.

and setting up nginx.conf file like

server{
    ....
}
server{
    ....
}
....
server {
    server_name nuget.myservername.com;

    set $documentRoot /home/web-release/nuget/simple-nuget-server/public;
    root $documentRoot;

    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 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $documentRoot/$fastcgi_script_name;
    }

    location = /index.php {
        dav_methods put delete;
        include fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;

        # 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;
        fastcgi_param SCRIPT_FILENAME $documentRoot/$fastcgi_script_name;
    }

    # used with x-accel-redirect
    location /packagefiles {
        internal;
        root /home/web-release/nuget/simple-nuget-server/public/;
    }
}

is it wrong configuration?

"fastcgi_pass php" to error on my server like this

nginx: [emerg] no port in upstream "php" in /etc/nginx/conf.d/vhost.conf:84
nginx: configuration file /etc/nginx/nginx.conf test failed

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?

Failed to process request. 'ZipArchive::open(): Empty string as source'. The remote server returned an error: (500) ZipArchive::open(): Empty string as source.

I created issue #38, i managed to "partially" solve it (now if i enter wrong API key i'll get error), i added this line in nuget.conf:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; under location = /index.php but now getting this, have no any PHP experience so no idea how to troubleshoot it.

 nuget push chocolatey.0.10.11.nupkg -s http://192.168.1.163 -apikey 12345 -verbosity detailed
Pushing chocolatey 0.10.11 to 'http://192.168.1.163'...
PUT http://192.168.1.163/api/v2/package/
System.InvalidOperationException: Failed to process request. 'ZipArchive::open(): Empty string as source'.
The remote server returned an error: (500) ZipArchive::open(): Empty string as source.. ---> System.Net.WebException: The remote server returned an error: (500) ZipArchive::open(): Empty string as source.
  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <bd46d4d4f7964dfa9beea098499ab597>:0
  at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <bd46d4d4f7964dfa9beea098499ab597>:0
  at NuGet.RequestHelper.GetResponse () [0x00121] in <e04d0b7bbb524b59b92c15cbbdf5d03e>:0
   --- End of inner exception stack trace ---
  at NuGet.PackageServer.EnsureSuccessfulResponse (NuGet.HttpClient client, System.Nullable`1[T] expectedStatusCode) [0x00189] in <e04d0b7bbb524b59b92c15cbbdf5d03e>:0
  at NuGet.PackageServer.PushPackageToServer (System.String apiKey, System.Func`1[TResult] packageStreamFactory, System.Int64 packageSize, System.Int32 timeout, System.Boolean disableBuffering) [0x0005c] in <e04d0b7bbb524b59b92c15cbbdf5d03e>:0
  at NuGet.PackageServer.PushPackage (System.String apiKey, NuGet.IPackage package, System.Int64 packageSize, System.Int32 timeout, System.Boolean disableBuffering) [0x0002d] in <e04d0b7bbb524b59b92c15cbbdf5d03e>:0
  at NuGet.Commands.PushCommand.PushPackageCore (System.String source, System.String apiKey, NuGet.PackageServer packageServer, System.String packageToPush, System.TimeSpan timeout) [0x00058] in <dc8a236afba24badbb185682f8956bec>:0
  at NuGet.Commands.PushCommand.PushPackage (System.String packagePath, System.String source, System.String apiKey, System.TimeSpan timeout) [0x0003f] in <dc8a236afba24badbb185682f8956bec>:0
  at NuGet.Commands.PushCommand.ExecuteCommand () [0x0008f] in <dc8a236afba24badbb185682f8956bec>:0
  at NuGet.Commands.Command.Execute () [0x000cf] in <dc8a236afba24badbb185682f8956bec>:0
  at NuGet.Program.Main (System.String[] args) [0x0019b] in <dc8a236afba24badbb185682f8956bec>:0

no errors in php7.0-fpm.log and nginx logs

nuget.conf:

# Example of an Nginx configuration for Simple NuGet Server

server {
    server_name 192.168.1.163;
    #client_max_body_size 20M;
    listen 80
    backlog=1024;
    root /opt/simple-nuget-server/public/;
    client_body_buffer_size 5M;
    client_header_buffer_size 4k;
    open_file_cache max=65535 inactive=60s;
    open_file_cache_valid 60s;
    open_file_cache_min_uses 1;
    open_file_cache_errors on;

    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$ {

        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_buffers 4 1024k;
        fastcgi_buffer_size 1024k;
        fastcgi_busy_buffers_size 1024k;
        fastcgi_temp_file_write_size 5M;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

    }

    location = /index.php {
        dav_methods PUT DELETE;

        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_buffers 4 1024k;
        fastcgi_buffer_size 1024k;
        fastcgi_busy_buffers_size 1024k;
        fastcgi_temp_file_write_size 5M;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

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

    # Used with X-Accel-Redirect
    location /packagefiles {
        internal;
        root /opt/simple-nuget-server/;
    }
}

image

Frameworks without dependencies are not saved to the database and don't appear with the NuGet client or Visual Studio

The NuGet server expects all targetFrameworks elements in the nuspec file to have a dependency element, this is not the case for some frameworks, e.g. .NETFramework4.6.1 and .NETStandard2.0.

<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Test Package Id</id>
    <version>1.0.5</version>
    <authors>Test Author</authors>
    <owners>Test Owner</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Package Description</description>
    <copyright>Copyright</copyright>
    <dependencies>
      <group targetFramework=".NETFramework4.6.1" />
      <group targetFramework=".NETStandard1.4">
        <dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
        <dependency id="System.Data.Common" version="4.3.0" exclude="Build,Analyzers" />
        <dependency id="System.Xml.XmlSerializer" version="4.3.0" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0" />
    </dependencies>
    <frameworkAssemblies>
      <frameworkAssembly assemblyName="System.Security" targetFramework=".NETFramework4.6.1" />
    </frameworkAssemblies>
  </metadata>
</package>

When viewed in Visual Studio 2017 I only see the .NETStandard1.4 framework shown in the dependencies listing, this means that when I install the package it loads as .NETStandard1.4 instead of .NETFramework4.6.1 or .NETStandard2.0.

I see that when the package is pushed to the NuGet server the framework and dependencies are extracted from the nuspec file, however, if the framework doesn't have dependencies then that framework isn't saved as a dependency to the database.

I have a fix for this and will create a PR.

FeedWriter returns invalid download link

This might be part configuration problem on my side and part implementation problem, not sure at the moment. The feed itself runs behind an nginx proxy listening on localhost:80 and rewriting requests to the PHP files; basically the default example configuration.

The nginx runs within a docker container that exposes port 80 as 16473 to the docker host, chosen by a fair dice roll. An apache on the host then in turn listens on port 443, terminates SSL and redirects to the container, as per

ProxyPreserveHost On
<Location /nuget>
    RequestHeader set X-Forwarded-Proto "https"
    ProxyPass http://127.0.0.1:16473
    ProxyPassReverse http://127.0.0.1:16473
</Location>

In this case, requests to

https://my.host.tld/nuget/FindPackagesById()?id='Some.Library'

return

...
<content type="application/zip" src="http://my.host.tld//download/Some.Library/1.3.0-unstable0008"/>
...

which is the wrong protocol (#9) and the wrong path (note the double slash).

allow htaccess

pls make a htacces version who do have a free hosting account

FeedWriter does not honor actual (or proxied) protocol

When serving the feed behind an SSL terminating endpoint (say, nginx as a reverse proxy), the download feeds are in the wrong format. The protocol should generally match the value of the X-Forwarded-Proto request header (which is either missing, http or https in this case).

Is ngx_http_dav_module required?

There is a dav_methods-directive in the nginx-config. Is the module ngx_http_dav_module required? If yes please add this to the Readme.

I dont have this module installed. I commented out the directive and now my pushes seem to do nothing (nuget says it was uploaded but the packagefiles-dir stays empty).

Nothing is pushed, no error even if i specify wrong key

Ubuntu 18.04.1 LTS

steps:

(renamed nginx.conf.example to nuget)

cp nginx.conf.example /etc/nginx/site-available/nuget

cat /etc/nginx/site-available/nuget
ln -s /etc/nginx/sites-available/nuget /etc/nginx/sites-enabled/nuget
/etc/init.d/nginx reload


server {
        server_name 192.168.1.163;
        root /opt/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;
        }

        # Used with X-Accel-Redirect
        location /packagefiles {
                internal;
                root /opt/simple-nuget-server/;
        }
}

nuget push chocolatey.0.10.11.nupkg -s http://192.168.1.163/ -apikey 112233 Pushing chocolatey 0.10.11 to 'http://192.168.1.163/'...
Your package was pushed.

But nothing was pushes,getting same message even after specifying wrong api key

cat /var.log/nginx/access/log

192.168.1.163 - - [28/Nov/2018:20:59:07 +0000] "GET / HTTP/1.0" 200 0 "-" "NuGet/2.8.7.0 (Unix 4.15.0.1021)"
192.168.1.163 - - [28/Nov/2018:20:59:07 +0000] "PUT /api/v2/package/ HTTP/1.0" 200 0 "-" "NuGet Command Line/2.8.7.0 (Unix 4.15.0.1021)"

cat /etc.nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        client_max_body_size 200M;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;



"Root element is missing" Error; SQLite3 file not being created?

So I've successfully pushed a test package, but now I am getting an error "Root element is missing" when trying to list the packages:

PS C:\gitlab\dthor\NuGetTest\NuGetTest\bin\Release> nuget push .\NuGetTest.0.0.1.nupkg -Source http://nuget.redacted.local
Pushing NuGetTest.0.0.1.nupkg to 'http://nuget.redacted.local'...
  PUT http://nuget.redacted.local/api/v2/package/
  OK http://nuget.redacted.local/api/v2/package/ 36ms
Your package was pushed.
PS C:\gitlab\dthor\NuGetTest\NuGetTest\bin\Release> nuget list -source http://nuget.redacted.local
Root element is missing.

I looked through the source code a bit and saw that it's supposed to create an SQLite DB file at ./db/packages.sqlite3 by default, and store the package file itself in ./packagefiles/. However, neither of these files are created on push.

$ pwd
/var/www/simple-nuget-server
$ ll
total 48K
drwxr-xr-x 7 root     root     4.0K Mar  2 08:58 ./
drwxr-xr-x 4 root     root     4.0K Mar  2 08:58 ../
drwxrwx--- 2 www-data www-data 4.0K Mar  2 08:58 db/
drwxr-xr-x 8 root     root     4.0K Apr 17 08:52 .git/
drwxr-xr-x 2 root     root     4.0K Mar  2 08:58 inc/
drwxrwx--- 2 www-data www-data 4.0K Mar  2 08:58 packagefiles/
drwxr-xr-x 2 root     root     4.0K Mar  2 08:58 public/
-rw-r--r-- 1 root     root      132 Mar  2 08:58 .editorconfig
-rw-r--r-- 1 root     root       32 Mar  2 08:58 .gitignore
-rw-r--r-- 1 root     root     1.1K Mar  2 08:58 LICENSE
-rw-r--r-- 1 root     root     1.3K Mar  2 08:58 nginx.conf.example
-rw-r--r-- 1 root     root     3.9K Mar  2 08:58 README.md
$ sudo ll db/
total 8.0K
drwxrwx--- 2 www-data www-data 4.0K Mar  2 08:58 ./
drwxr-xr-x 7 root     root     4.0K Mar  2 08:58 ../
-rw-r--r-- 1 root     root        0 Mar  2 08:58 .gitkeep
$ sudo ll packagefiles/
total 8.0K
drwxrwx--- 2 www-data www-data 4.0K Mar  2 08:58 ./
drwxr-xr-x 7 root     root     4.0K Mar  2 08:58 ../
-rw-r--r-- 1 root     root        0 Mar  2 08:58 .gitkeep

Nginx shows no error in the logs, and /var/log/nginx/access.log looks like:

192.168.11.124 - - [17/Apr/2018:08:57:28 -0700] "PUT /api/v2/package/ HTTP/1.1" 200 56 "-" "NuGet Command Line/4.6.2 (Microsoft Windows NT 6.2.9200.0)"
192.168.11.124 - - [17/Apr/2018:08:57:33 -0700] "GET / HTTP/1.1" 200 31 "-" "NuGet Command Line/4.6.2 (Microsoft Windows NT 6.2.9200.0)"
192.168.11.124 - - [17/Apr/2018:08:57:33 -0700] "GET /$metadata HTTP/1.1" 200 4509 "-" "NuGet Command Line/4.6.2 (Microsoft Windows NT 6.2.9200.0)"
192.168.11.124 - - [17/Apr/2018:08:57:33 -0700] "GET /Search()?$filter=IsLatestVersion&$orderby=Id&searchTerm=''&targetFramework=''&includePrerelease=false&$skip=0&$top=30&semVerLevel=2.0.0 HTTP/1.1" 200 31 "-" "NuGet Command Line/4.6.2 (Microsoft Windows NT 6.2.9200.0)"

Versions:

(It's hard to see in the output, but ngx_http_dav_module is indeed installed)

$ php --version
PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
$ nginx -V
nginx version: nginx/1.10.3 (Ubuntu)
built with OpenSSL 1.0.2g  1 Mar 2016
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-threads --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/headers-more-nginx-module --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-auth-pam --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-cache-purge --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-development-kit --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-echo --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/ngx-fancyindex --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-http-push --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-lua --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-upload-progress --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/nginx-upstream-fair --add-module=/build/nginx-Q158zN/nginx-1.10.3/debian/modules/ngx_http_substitutions_filter_module

SimpleXMLElement::addChild(): unterminated entity referenc

On my nuget server search failed for a package with an ampersand in the title, i.e. Tom & Jerry

/var/www/simple-nuget-server/inc/feedwriter.php:213

SimpleXMLElement::addChild(): unterminated entity reference  Jerry

https://server.tld/Search()?$filter=IsLatestVersion&searchTerm='Tom'&targetFramework='net472'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0'

Replacing $value with htmlspecialchars($value) solved the issue

        private function addMeta($entry, $name, $value, $type = null) {
                $node = $entry->addChild(
                        $name,
                        htmlspecialchars($value),
                        $value,
                        'http://schemas.microsoft.com/ado/2007/08/dataservices'
                );

Configurable username and password for DBO

I'm currently working on a Docker image containing Nginx and HHVM in oder to quickly set up this server. It uses some shell scripts to replace the API key in the configuration file and I thought about doing the same with the PDO connection string.

However, from what I can tell, the PDO constructor requires the username and password to the database to be separate parameters, and these are not provided to the constructor in db.php, so there is currently no (sane) way for me make them configurable by the end user through environmental variables.

Can you add support for those in the inc/config.php?

Implement paging

When using list, nuget automatically tries to page with a pagesize of 30.
As paging is not implemented yet, it will output only 30 results and then endlessly loop with calls like:

GET http://myserver/Search()?$orderby=Id&searchTerm=''&targetFramework=''&includePrerelease=false&$skip=30&$top=30&semVerLevel=2.0.0
OK http://myserver/Search()?$orderby=Id&searchTerm=''&targetFramework=''&includePrerelease=false&$skip=30&$top=30&semVerLevel=2.0.0 40ms 

Can be simply reproduced by calling:
nuget list -AllVersions -Verbosity detailed -Source http://myserver

Not seeing packages in the browser

I can upload & download packages via nuget CLI but I don't see them on the web page. All I get is xml output

<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app" xml:base="http://nuget-server.stonemor.com/" capture-installed="true">
<workspace>
<atom:title>Default</atom:title>
<collection href="Packages">
<atom:title>Packages</atom:title>
</collection>
</workspace>
</service>

Is this normal?

What does "Change "php" to the name of a PHP upstream in your Nginx config." mean?

I'm having some trouble setting this up. I'm not familiar with nginx at all, sadly, so it's definitely on me.

In the readme, you have this line:

Change "php" to the name of a PHP upstream in your Nginx config. This can be regular PHP 5.4+ or HHVM.

Can you expand on that a bit? Which instance of "php" do I change? It shows up 15 times in the example nginx file.

If I ignore that change and attempt to start nginx, I get a no port in upstream "php" error:

$ sudo service nginx start
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
$ systemctl status nginx.service
โ— nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2018-04-16 16:04:48 PDT; 18s ago
  Process: 12968 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Apr 16 16:04:48 nuget systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 16 16:04:48 nuget nginx[12968]: nginx: [emerg] no port in upstream "php" in /etc/nginx/sites-enabled/nuget:25
Apr 16 16:04:48 nuget nginx[12968]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 16 16:04:48 nuget systemd[1]: nginx.service: Control process exited, code=exited status=1
Apr 16 16:04:48 nuget systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Apr 16 16:04:48 nuget systemd[1]: nginx.service: Unit entered failed state.
Apr 16 16:04:48 nuget systemd[1]: nginx.service: Failed with result 'exit-code'.

Apache config would be nice

Thanks for your project. Is there anyway for you to attach an apache configuration example, like you did the nginx one?

I am having trouble translating the rewrite rules for use in my .htaccess.

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.