Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:22:41+00:00 2026-06-08T23:22:41+00:00

I am deploying a web2py application, and I will be serving it with Apache

  • 0

I am deploying a web2py application, and I will be serving it with Apache via mod_wsgi. I have the following WSGI directives in my virtual host configuration:

  WSGIDaemonProcess web2py user=www-data group=www-data \
                           display-name=%{GROUP}
  WSGIProcessGroup web2py
  WSGIScriptAlias / /var/www/web2py/wsgihandler.py

This is working, but it is taking the system wide python installation. As a result, some packages are not found (since they are only present in my virtualenv). I would like to tell this particular virtual host (or the whole Apache, if there is no other way), to use the python installation in my virtual environment (/home/myuser/.virtualenvs/python2.7.2/bin).

Is it possible to configure this for Apache? Or better, just for my virtual host? I would like to cause as little effect as possible to the rest of the system (specifically, I do not want to modify the default python version used system wide)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:22:43+00:00Added an answer on June 8, 2026 at 11:22 pm

    In your wsgihandler.py add this at the top…

    activate_this = '/path/to/virtualenv/bin/activate_this.py'
    execfile(activate_this, dict(__file__=activate_this)
    import sys
    sys.path.insert(0, '/path/to/web2py_dir')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When deploying Rails via Passenger or Mongrel you have multiple instances of the application
I am deploying sql express with my application. I will like that database engine
When deploying the application to the device, the program will quit after a few
WHen deploying my Spring / Hibernate application, I get the following warning related to
When deploying Windows Phone 7 application i have choice for References Properties - Copy
I have an issue deploying Sencha Touch 2.0.1.1 application with Phonegap 1.8.1 wrapper (Phonehap
After deploying an MVC3 application that has Telerik Extensions menu, I have noted there
Deploying on JBoss AS 7.1.0.Final. I have a very simple test app. It was
After deploying WCF server (svc) on my Server, I have got this message when
After deploying to Azure, I kept getting server errors -- the application would not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.