nginx + apache + uwsgi -- only index.html loads inside web2py

42 views
Skip to first unread message

LoveWeb2py

unread,
Feb 19, 2017, 5:18:06 PM2/19/17
to web2py-users
Hello,

I ran the setup-web2py-nginx-uwsgi-ubuntu.sh to get web2py up and running, but i'm running into an odd issue. 

I'm using 1and1 hosting and they use vhosts. So the setup they're using has nginx on the front end (port 80) and connects to apache over port 7080.

Here is my conf file for apache2

WSGIDaemonProcess web2py user=www-data group=www-data

<VirtualHost *:7080>

 WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

  <Directory /home/www-data/web2py>
    AllowOverride None
    Require all granted
    <Files wsgihandler.py>
      Require all granted
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
        /home/www-data/web2py/applications/$1/static/$2

  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Require all granted
  </Directory>

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost *:7081>
  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

  <Directory /home/www-data/web2py>
    AllowOverride None
    Require all denied
    <Files wsgihandler.py>
      Require all granted
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
        /home/www-data/web2py/applications/$1/static/$2

  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Require all granted
  </Directory>

The problem I'm having is when I go to visit my site. I put an index.html file in my /home/www-data/web2py directory. I'm actually seeing the content in index.html. It appears as if the wsgihandler.py isn't working correctly. I've been troubleshooting for days and I can't figure this out. Any help is greatly appreciated.

Áureo Dias Neto

unread,
Feb 19, 2017, 5:19:41 PM2/19/17
to web...@googlegroups.com
Hello 
Or you use nginx + uwsgi
Or use apache + wsgi

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

LoveWeb2py

unread,
Feb 19, 2017, 5:23:54 PM2/19/17
to web2py-users
I think nginx is being used for routing and apache is what is actually being used. This is the hosting provider I'm using. https://www.1and1.com/linux-web-hosting

When I run a netstat it shows that port 80 is listening through nginx. In the nginx configuration there is a proxy setting that forwards port 80 traffic to port 7080 which is hosted by Apache.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.

Áureo Dias Neto

unread,
Feb 19, 2017, 5:26:15 PM2/19/17
to web...@googlegroups.com
Nginx is a server, and apache too..  Dont need to use the two.. 
I was using nginx and uwsgi 

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

LoveWeb2py

unread,
Feb 19, 2017, 6:27:18 PM2/19/17
to web2py-users
After some digging it looks like someone else had a similar issue:


I'm using a plesk dashboard, so it's not being too friendly. I'll keep anyone posted if I get it working. Thanks!
Reply all
Reply to author
Forward
0 new messages