Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a problem in nginx or mod_zip? #29

Closed
ronalfei opened this issue Apr 3, 2014 · 2 comments
Closed

Is there a problem in nginx or mod_zip? #29

ronalfei opened this issue Apr 3, 2014 · 2 comments

Comments

@ronalfei
Copy link

ronalfei commented Apr 3, 2014

I want zip files from local path: /mnt/lelink/movies/temp/139392056522454729/139400226980221046;
nginx location config below:
location /v2/zip/download {
root /mnt/lelink/movies/temp/139392056522454729/139400226980221046;
proxy_pass http://api-server/v1/clip/zip/download;
}

upstream return content:

  • 140279 /00001.mp4 00001.mp4
  • 98657 /00002.mp4 00002.mp4
  • 47956 /00003.mp4 00003.mp4
  • 89650 /00004.mp4 00004.mp4
  • 129491 /00005.mp4 00005.mp4

mod_zip donot read files from rootpath which I configed in my location , It read from the default root path "/opt/srv/nginx-1.4.5/html",
Is there a problem?

@pgaertig
Copy link

pgaertig commented Apr 3, 2014

This is your configuration problem. You top location (/) root defaults to nginx directory. Anyway ideally you should create internal location which is not accessible to public:

location /myfiles/ {
  internal;
  root /path/to/my/files/;
}

Then upstream should return:

- 140279 /myfiles/00001.mp4 00001.mp4

Issue to close.

@ronalfei
Copy link
Author

ronalfei commented Apr 3, 2014

thank you for reply, closed

@ronalfei ronalfei closed this as completed Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants