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

Doc Improvement: more explanation about SCRIPT_NAME #472

Closed
sgon00 opened this issue Jan 11, 2013 · 5 comments
Closed

Doc Improvement: more explanation about SCRIPT_NAME #472

sgon00 opened this issue Jan 11, 2013 · 5 comments

Comments

@sgon00
Copy link

sgon00 commented Jan 11, 2013

Hi, a newbie here. This is the first time I submit an issue. I don't know how to make the issue as improvement and how to give a "documentation" label. I don't see those options when I click "New Issue" Button. I would like to talk about three things here.

1, SCRIPT_NAME
I am hosting moin wiki under http://domain.com/wiki/. It was working fine in apache + mod_wsgi. When I switch to Nginx + Gunicorn, the url path is always wrong. I did lots of google and finally find out the solution, the following is what I did to fix the problem:

location /wiki {
proxy_pass http://127.0.0.1:8000;
client_max_body_size 4G;
proxy_redirect off;
proxy_set_header SCRIPT_NAME /wiki;
include /etc/nginx/proxy_params;
}

Since I am a newbie, I even don't know what SCRIPT_NAME is. I was wondering why everything works in apache+mod_wsgi, but not working in nginx+gunicorn at the beginning. Finally, I know I need to give "proxy_set_header SCRIPT_NAME /wiki;" in the location block. I would like the documentation gives more explaination about this case. something like (If you host your app at nonroot, you will have to provide "proxy_set_header SCRIPT_NAME /app_path;") That will be much easier for newbie like me to learn gunicorn. I hope more and more people use it, because it's great.

2, proxy_redirect off;
In the following two urls:
http://docs.gunicorn.org/en/latest/deploy.html
http://gunicorn.org/#deployment

One example has "proxy_redirect off;", One does not. I did google this. I don't really get it. I just want to know whether or not I need "proxy_redirect off;".

3, supervisord
under http://docs.gunicorn.org/en/latest/deploy.html
I would like the doc added one line: "Even if you are using virtualenv, you can still directly call /path/to/gunicorn.". I figured out "source bin/activate" just change the PATH. nothing else. and directly calling /path/to/gunicorn will work because the script is using virtualenv python instead of system python. It did google a lot to figure out how to use virtualenv in supervisor for gunicorn. Some online blogs and stackoverflow have some bad answers. Finally, I found out I could call it directly. so stupid I am.

This improvement may look stupid to experts and advanced users. But it really took me a lot of time to figure it out for a newbie.

Thanks a lot for your time. If I should not open an issue like this, please let me know.

@sgon00
Copy link
Author

sgon00 commented Jan 11, 2013

Add one more improvement (a small doc bug), in the link http://docs.gunicorn.org/en/latest/faq.html, there are many broken links.
For instance:
http://docs.gunicorn.org/design.html
should be updated to
http://docs.gunicorn.org/en/latest/design.html

All the links on that page are using the old style.

@benoitc
Copy link
Owner

benoitc commented Jan 11, 2013

I will review all the ticket later today thanks for that feedback. Can you eventually create a PR ? Or just send me a patch? That is the best way to add the changes to the project :)

@sgon00
Copy link
Author

sgon00 commented Jan 13, 2013

Hi benoitc,
Thanks a lot for your reply. I don't know how to create a PR or a patch. I also do NOT think my English is good enough to be in the doc as you can see from my words. :)
PS: do I have the privilege to add a label? I don't find a way to add a "Documentation" label in the issue.
Thanks and Regards.

@benoitc
Copy link
Owner

benoitc commented Jun 24, 2013

not sure if the doc need more changes in current version. Can another eye have a look on it ?

cc @sirkonst @kennethreitz @tilgovi

@benoitc
Copy link
Owner

benoitc commented Jun 29, 2013

closing, looks fixed to my eyes. feel free to reopen this issue if needed.

@benoitc benoitc closed this as completed Jun 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants