On Jan 20, 11:15 pm, Johann Spies <johann.sp...@gmail.com> wrote: > The script inhttp://www.web2pyslices.com/main/slices/take_slice/29 > works well when web2py is in the server root. > > I want to install web2py on a server that already has a php-site. I > have tried and modify the apache configuration to one below (I tried > it with and without the 'Alias' line but have no success). > > How do I do it?
You shouldn't be using the Alias directive outside of the VirtualHost. As asked in the thread: http://groups.google.com/group/web2py/browse_frm/thread/6ae2a411d79ade50 where similar question was asked, you need to indicate: """ What needs to control the root page of the web server, a PHP script or web2py? Can the PHP stuff be placed under a common sub URL rather than .php files sprinkled directly under '/'? If web2py controls root page and PHP stuff under a common sub URL then is easy. If .php is sprinkled in DocumentRoot and should take precedence over web2py when such files exist, then a little bit tricker to configure, but still possible. The information you need is in: http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines so long as you know what to look for and how to apply it. ;-) """ > Johann. > > My present configuration. > > #NameVirtualHost *:80 > NameVirtualHost *:443 > > Alias /sarua "/home/www-data/web2py/applications/sarua" > > <VirtualHost *:80> > WSGIDaemonProcess web2py user=www-data group=www-data > WSGIProcessGroup web2py > WSGIScriptAlias /sarua /home/www-data/web2py/wsgihandler.py > > <Directory /home/www-data/web2py> > AllowOverride None > Order Allow,Deny > Deny from all > <Files wsgihandler.py> > Allow from all > </Files> > </Directory> > > AliasMatch ^/([^/]+)/static/(.*) \ > /home/www-data/web2py/applications/$1/static/$2 > <Directory /home/www-data/web2py/applications/*/static/> > Order Allow,Deny > Allow from all > </Directory> > > <Location /admin> > Deny from all > </Location> > > <LocationMatch ^/([^/]+)/appadmin> > Deny from all > </LocationMatch> > > CustomLog /var/log/apache2/access.log common > ErrorLog /var/log/apache2/error.log > </VirtualHost> > > <VirtualHost *:443> > SSLEngine on > SSLCertificateFile /etc/apache2/ssl/self_signed.cert > SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key > > WSGIProcessGroup web2py > > WSGIScriptAlias /sarua /home/www-data/web2py/wsgihandler.py > > <Directory /home/www-data/web2py> > AllowOverride None > Order Allow,Deny > Deny from all > <Files wsgihandler.py> > Allow from all > </Files> > </Directory> > > AliasMatch ^/([^/]+)/static/(.*) \ > /home/www-data/web2py/applications/$1/static/$2 > > <Directory /home/www-data/web2py/applications/*/static/> > Order Allow,Deny > Allow from all > </Directory> > > CustomLog /var/log/apache2/access.log common > ErrorLog /var/log/apache2/error.log > </VirtualHost>
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.