I am a beginner to using Pyramid, and somewhat to python in general. I am trying to deploy my first Pyramid app (I have it working locally) using wsgi. I have been following the instructions at https://docs.pylonsproject.org/projects/pyramid/1.0/tutorials/modwsgi/index.html but I can't seem to get it to work.
I have some questions, referring to the instructions in the link above:
• Referring to #4, where should the virtualenv be created? Say I have created an app using the webfaction control panel called "site_dev," located at /home/username/webapps/site_dev - where should it be installed relative to this?
• Referring to #9, I'm assuming the file to be editing is (assuming my app is called "site_dev") /home/username/webapps/site_dev/apache2/conf/httpd.conf. Is this correct?
• I'm still unclear on how, even if I get through all of these steps and get the app running, I will be able to see the app when I navigate to the url (domain) it is associated with. For example, if I navigate to dev.site.com, will I see the app if I follow these steps correctly?
I appreciate any help.
asked 07 Sep '11, 12:25
You can create your virtualenv anywhere you want within your home directory. What matters is that you configure Apache so that it can locate the Python modules within your virtualenv (ie, the "python-path" parameter in httpd.conf).
That is correct.
If you add your 'site_dev' app to a site in the control panel, and you have specified 'dev.site.com' as a subdomain for that site, then you should see the app when you navigate to dev.site.com.
answered 07 Sep '11, 14:31