Giter VIP home page Giter VIP logo

Comments (5)

jbg avatar jbg commented on May 26, 2024

You can't serve the files directly without some rewrites, see the sample nginx config in the repo: https://github.com/panamax-rs/panamax/blob/master/nginx.sample.conf

I'm not sure why the decision was made to have the on-disk layout differ from the served layout. I wanted to use panamax to update a mirror which is mounted into build tasks (so the crates base URL is a file:// URL) but it doesn't work because of this same issue.

from panamax.

k3d3 avatar k3d3 commented on May 26, 2024

Oh shoot, I didn't realize the formats differed - the intention was to have them be the same format. I could've sworn the index used to be 3/(crate) rather than 3/(1st letter) /(crate).

Ill try to get this fixed - sorry about that.

from panamax.

jbg avatar jbg commented on May 26, 2024

Actually even with the rewrites in place, there seem to be issues with crates that have short names.

[16/Jan/2023:05:40:15 +0000] "GET /crates/3/n/num/0.3.1/num-0.3.1.crate HTTP/1.1" 404 153 "-" "cargo 1.66.1 (ad779e08b 2023-01-10)"

from panamax.

jbg avatar jbg commented on May 26, 2024

I replaced the rewrites with this and it seems to work:

rewrite "^/crates/3/[^/]/([^/]+)/([^/]+)/([^/]+)$" "/crates/3/$1/$2/$3";

The other rewrites, so far, seem unnecessary. Maybe needed for an older cargo version?

from panamax.

k3d3 avatar k3d3 commented on May 26, 2024

This should be fixed as of 1.0.8. Feel free to reopen this issue if you're still having trouble.

from panamax.

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.