phusion / passenger_library

Phusion Passenger documentation
https://www.phusionpassenger.com/docs
Other
48 stars 111 forks source link

Deployment walkthroughs don't mention 'location' setting #78

Closed Shelagh-Lewins closed 5 years ago

Shelagh-Lewins commented 5 years ago

It would be great if the deployment walkthroughs such as https://www.phusionpassenger.com/library/walkthroughs/deploy/python/digital_ocean/nginx/oss/xenial/deploy_app.html could mention the 'location' setting in the Passenger config file.

For example, if you are using Webpack to build a Django app, Nginx will not serve the built bundle because it is not in the 'public' folder. You need to add 'location' to the server block:

server { ...

Tell Nginx where Webpack puts the build output

location /static/ {
   autoindex on;
   alias /var/www/appname/appname/buildoutput/;
}

... }

This information could save novices a lot of time trying to work out what's wrong with their Django/Webpack config.

scarhand commented 5 years ago

Thanks for reporting this, however, this seems to apply to the "old" documentation at www.phusionpassenger.com/library. That version of the documentation is no longer actively maintained. The new documentation can be found at https://www.phusionpassenger.com/docs (on branch docs_2018).

Does this issue also apply to the new documentation?

Shelagh-Lewins commented 5 years ago

Hi! This is the link that comes up when I do a web search for how to deploy a Python app using Passenger:

https://www.phusionpassenger.com/library/walkthroughs/deploy/python/digital_ocean/nginx/oss/xenial/deploy_app.html

There was nothing on the doc to suggest it is out of date, and I would never have found the new docs without your message. Is there anything you can do to raise the profile of the new docs?

This is the new doc, yes?

https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/deploying_your_app/oss/digital_ocean/python/nginx/

I don't see anything about location there, so I think the same issue applies. It might also be worth mentioning that you may need to use either "root" or "alias" depending on how your static files are structured?

Thanks, I really appreciate the Passenger docs and the effort that goes into them.