private feeds via nginx reverse proxy (workaround)
See original GitHub issueSeveral people would like to run a private nuget feed. The depending pull request is open for 2 years now. It seems that this could take a while to be published. https://github.com/loic-sharma/BaGet/pull/69
I provide the baget service behind a nuget reverse proxy where nginx takes over the authentification part. In combination with docker compose this works quite well. I think this is a nice workaround as long the pull request is open.
The nginx site configuration:
server {
listen 80;
server_name packages.myawesomeproject.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
location / {
auth_basic "Resticted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://baget:80;
}
creating the htpasswd file:
sudo sh -c "echo -n '[username]:' >> /etc/nginx/.htpasswd"
sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"
As many people didn’t know how nuget auth works exactly it would be nice to add this way to the documentation. An all in one docker-compose file with nginx and baget would be awesome.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:7
Top Results From Across the Web
How to make an existing caching Nginx proxy use another ...
The issue with Lukas's solution is HttpRewriteModule , which automatically turns everything with http(s) at the front into a 302.
Read more >How To Set Up a Reverse Proxy (for Nginx & Apache)
Comprehensive Reverse Proxy guide for WordPress. Learn how to load a different WordPress site from a subdirectory via reverse proxy.
Read more >I can access Django server directly despite nginx reverse ...
It is working well: I can access the service with http://{IP} but also with http://{IP}:8000 which hits Django server directly. I don't think...
Read more >Understanding Nginx HTTP Proxying, Load Balancing ...
Nginx is a high performance reverse proxy server and web server. In this guide, we will explore Nginx's http proxying and load balancing ......
Read more >Access your internal websites! Nginx Reverse Proxy in Home ...
00:00 Intro 00:16 Nginx Reverse Proxy Overview 03:00 Install MariaDB and Proxy Add-ons 05:45 Initial Log into Nginx Proxy Manager 06:55 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @abakumov-v,
Here’s something that works. It may not be the prettier or easier way as i didn’t put a lot of time into it.
Just pop a thumb up on this message if that helps you 😉
Let’s avoid flooding this topic !
nginx config :
But how is it possible to authenticate when using the included symbol-server? It seems like Visual Studio has no built-in option to use password-protected symbol servers and it returns me a 401: Unauthorized.