nginx much better :)
simple setup -
https://www.digitalocean.com/community/tutorials/how-to-deploy-web2py-python-applications-with-uwsgi-and-nginx-on-centos-7
суббота, 10 февраля 2018 г., 17:11:43 UTC+3 пользователь lucas написал:
>
> hey all,
>
> setting up a new server on centos 7.4 and apache 2.4. web2py is running
> fine for i get the welcome content but none of the files under static are
> coming down to the client. please makes suggestions. thank you.
>
> lucas
>
> here is my default.conf file where you'll see i've tried a bunch of
> options. nothing worked so far.:
>
>
>
>
> NameVirtualHost *:80
> NameVirtualHost *:443
>
>
> <VirtualHost *:80>
> WSGIProcessGroup web2py
> # WSGIDaemonProcess web2py user=apache group=apache display-name=%{GROUP}
> WSGIPassAuthorization On
>
> <Directory /opt/web-apps/web2py>
> AllowOverride None
> Order Allow,Deny
> Deny from all
> <Files wsgihandler.py>
> Require all granted
> Allow from all
> </Files>
> </Directory>
>
> AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)
> /opt/web-apps/web2py/applications/\$1/static/\$2
> # AliasMatch ^/([^/]+)/static/(.*)
> /opt/web-apps/web2py/applications/$1/static/$2
>
> <Directory /opt/web-apps/web2py/applications/*/static>
> # Options -Indexes
> Order Allow,Deny
> Allow from all
> # Require all granted
> </Directory>
>
> <Location /admin>
> Deny from all
> </Location>
>
> <LocationMatch ^/([^/]+)/appadmin>
> Deny from all
> </LocationMatch>
>
> CustomLog /var/log/httpd/access_log common
> ErrorLog /var/log/httpd/error_log
> </VirtualHost>
>
> <VirtualHost *:443>
> # SSLEngine on
> # SSLCertificateFile /etc/httpd/ssl/self_signed.cert
> # SSLCertificateKeyFile /etc/httpd/ssl/self_signed.key
>
> WSGIProcessGroup web2py
> # WSGIDaemonProcess web2py user=apache group=apache display-name=%{GROUP}
> WSGIPassAuthorization On
>
> <Directory /opt/web-apps/web2py>
> AllowOverride None
> Order Allow,Deny
> Deny from all
> <Files wsgihandler.py>
> Require all granted
> Allow from all
> </Files>
> </Directory>
>
> AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)
> /opt/web-apps/web2py/applications/\$1/static/\$2
> # AliasMatch ^/([^/]+)/static/(.*)
> /opt/web-apps/web2py/applications/$1/static/$2
>
> <Directory /opt/web-apps/web2py/applications/*/static>
> # Options -Indexes
> # ExpiresActive On
> # ExpiresDefault "access plus 1 hour"
> Order Allow,Deny
> Allow from all
> # Require all granted
> </Directory>
>
> CustomLog /var/log/httpd/access_log common
> ErrorLog /var/log/httpd/error_log
> </VirtualHost>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.