title: Python wsgi:ssl-error Can't connect to HTTPS URL because the SSL module is not available
body: <p>I just migrated from Amazon ec2 instance to DigitalOcean droplet.
  Everything seems to be working fine until I ran into the SSL problem when I configure my python app, WSGI and apache2.</p>
  
  <p>Droplet: Ubuntu 16.04
  Python version: 2.7.12</p>
  
  <p>VirtualHost file</p>
  
  <pre><code>WSGISocketPrefix /var/run/wsgi                                                           
  &lt;VirtualHost *:80&gt;                                                                       
  ServerName c123456.com                                                               
  #translatr.varunmalhotra.xyz                                                         
  
  #DocumentRoot /var/www/html                                                          
  #ErrorDocument 404 /notFound404.html                                                 
  ErrorLog /var/log/translatr.error.log                                                
  CustomLog /var/log/translatr.access.log combined                                     
  
  WSGIDaemonProcess translatrapp python-path=/var/www/html/translatr:/var/www/html/translatr/ENV/lib/python2.7/site-packages                                                    
  WSGIScriptAlias / /var/www/html/translatr/translatrapp.wsgi                          
  
  &lt;Directory /var/www/html/translatr&gt;                                                  
      WSGIProcessGroup translatrapp                                                    
      WSGIApplicationGroup %{GLOBAL}                                                   
      Order deny,allow                                                                 
      Allow from all                                                                   
  &lt;/Directory&gt;                                                                         
  </code></pre>
  
  <p><br>
  
  ```</p>
  
  <p>My app uses python <code>requests</code> module to make a GET request.
  The requests return <code>500</code> and when I check my logs, I could see</p>
  
  <pre><code>[Sat Jan 28 10:46:23.754636 2017] [wsgi:error] [pid 6627:tid 139754554279680]     request
   = requests.get(link, headers=agents, verify=False)                                      
  [Sat Jan 28 10:46:23.754641 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/api.py", line 69, in get   
  [Sat Jan 28 10:46:23.754645 2017] [wsgi:error] [pid 6627:tid 139754554279680]     return 
  request('get', url, params=params, **kwargs)                                             
  [Sat Jan 28 10:46:23.754650 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/api.py", line 50, in reques
  t                                                                                        
  [Sat Jan 28 10:46:23.754655 2017] [wsgi:error] [pid 6627:tid 139754554279680]     respons
  e = session.request(method=method, url=url, **kwargs)                                    
  [Sat Jan 28 10:46:23.754659 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/sessions.py", line 468, in 
  request                                                                                  
  [Sat Jan 28 10:46:23.754664 2017] [wsgi:error] [pid 6627:tid 139754554279680]     resp = 
  self.send(prep, **send_kwargs)                                                           
  [Sat Jan 28 10:46:23.754669 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/sessions.py", line 597, in 
  send                                                                                     
  [Sat Jan 28 10:46:23.754673 2017] [wsgi:error] [pid 6627:tid 139754554279680]     history
   = [resp for resp in gen] if allow_redirects else []                                     
  [Sat Jan 28 10:46:23.754678 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/sessions.py", line 195, in 
  resolve_redirects                                                                        
  [Sat Jan 28 10:46:23.754683 2017] [wsgi:error] [pid 6627:tid 139754554279680]     **adapt
  er_kwargs                                                                                
  [Sat Jan 28 10:46:23.754687 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/sessions.py", line 576, in 
  send                                                                                     
  [Sat Jan 28 10:46:23.754692 2017] [wsgi:error] [pid 6627:tid 139754554279680]     r = ada
  pter.send(request, **kwargs)                                                             
  [Sat Jan 28 10:46:23.754697 2017] [wsgi:error] [pid 6627:tid 139754554279680]   File "/va
  r/www/html/translatr/ENV/lib/python2.7/site-packages/requests/adapters.py", line 433, in 
  send                                                                                     
  [Sat Jan 28 10:46:23.754702 2017] [wsgi:error] [pid 6627:tid 139754554279680]     raise S
  SLError(e, request=request)                                                              │
  [Sat Jan 28 10:46:23.754706 2017] [wsgi:error] [pid 6627:tid 139754554279680] SSLError: C│
  an't connect to HTTPS URL because the SSL module is not available.
  </code></pre>
  
  <p>I have searched a lot.
  I have tried installing <code>openssl</code>, other conf, but really frustrated.
  I don't know how it's working smooth in Amazon ec2 but not in Droplet.</p>
  
  <p>Any help in a good direction would be appreciated. Thanks</p>