Hi all, I need to configure a webserver with multiples web2py instances. Each instance is linked to a python virtualenv in home folder of each users (3 users)
- I have no access to the dns and the proxy - and can't ask to modify the dns and webproxy - and can't install a local dns server the server has an intranet domain name, myserver.mydomain i need for example. myserver.mydomain/myuser1/ to point on the root of the user1 web2py instance myserver.mydomain/myuser1/app1/ to point on the app1 of the user1 web2py instance myserver.mydomain/myuser2/ to point on the root of the user2 web2py instance myserver.mydomain/myuser2/app1/ to point on the app1 of the user2 web2py instance ect... how to configure nginx and web2py router for each instances? I have try /etc/nginx/sites-available/web2py server { listen 80; server_name $hostname; ###to enable correct use of response.static_version #location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ { # alias /home/www-data/web2py/applications/$1/static/$2; # expires max; #} ### ###if you use something like myapp = dict(languages=[en, it, jp], default_language=en) in your routes.py #location ~* /(\w+)/(en|it|jp)/static/(.*)$ { # alias /home/www-data/web2py/applications/$1/; # try_files static/$2/$3 static/$3 =404; #} ### location ~* /(\w+)/static/ { #root /home/www-data/web2py/applications/; root /home/user1/Vhome/Vweb2py/web2py/applications/; #remove next comment on production #expires max; ### if you want to use pre-gzipped static files (recommended) ### check scripts/zip_static_files.py and remove the comments # include /etc/nginx/conf.d/web2py/gzip_static.conf; ### } location /user1 { #uwsgi_pass 127.0.0.1:9001; uwsgi_pass unix:///tmp/web2py.socket; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; ###remove the comments to turn on if you want gzip compression of your pages # include /etc/nginx/conf.d/web2py/gzip.conf; ### end gzip section ### remove the comments if you use uploads (max 10 MB) #client_max_body_size 10m; ### uwsgi_param SCRIPT_NAME /user1; uwsgi_modifier1 30; } } server { listen 443 default_server ssl; server_name $hostname; ssl_certificate /etc/nginx/ssl/web2py.crt; ssl_certificate_key /etc/nginx/ssl/web2py.key; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_ciphers ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256- SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA; ssl_protocols SSLv3 TLSv1; keepalive_timeout 70; location / { #uwsgi_pass 127.0.0.1:9001; uwsgi_pass unix:///tmp/web2py.socket; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; ###remove the comments to turn on if you want gzip compression of your pages # include /etc/nginx/conf.d/web2py/gzip.conf; ### end gzip section ### remove the comments if you want to enable uploads (max 10 MB) #client_max_body_size 10m; ### } ## if you serve static files through https, copy here the section ## from the previous server instance to manage static files } and routes.py # -*- coding: utf-8 -*- # default_application, default_controller, default_function # are used when the respective element is missing from the # (possibly rewritten) incoming URL # default_application = 'init' # ordinarily set in base routes.py default_controller = 'default' # ordinarily set in app-specific routes.py default_function = 'index' # ordinarily set in app-specific routes.py BASE = 'user1' routers = dict( BASE = dict( domains = { 'jeraweb1.bc': 'aut', 'jeraweb1.bc/user1/welcome': 'welcome', 'jeraweb1.bc/user1/aut': 'aut', 'jeraweb1.bc/user1/aut2': 'aut2', } ), ) but that don't work. Any idea? -- --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.