On Tue, 1 Dec 2009 07:01:31 -0800 (PST)
mdipierro <mdipie...@cs.depaul.edu> wrote:

> Did you try this?

I had forgotten that script so i read it first. I am not usind Debian based 
distro so i followed the steps of the script one by one. 

> 
> http://www.web2pyslices.com/main/slices/take_slice/29
> 
> --
> 

I created a www-data directory at my user home directory and copied the web2py 
directory there. Chmod the direcotory do that the apache user is able to read 
and write to it. 

The current 01_web2py_vhost.conf is as follows:

#virtual host
LoadModule wsgi_module modules/mod_wsgi.so
NameVirtualHost *:80
<VirtualHost *:80>
  ServerName web2py.localhost
··
  WSGIDaemonProcess web2py user=apache group=apache display-name=%{GROUP} 
processes=5 maximum-requests=1000
  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/oguz/www-data/web2py/wsgihandler.py
··
 # DocumentRoot /var/www/localhost/htdocs/web2py/applications

  <Directory /home/oguz/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/oguz/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>

When i try to reach the http://web2py.localhost/test/default/images url below 
is the error.log message:
[Tue Dec 01 20:36:02 2009] [error] [client 127.0.1.1] File does not exist: 
/home/oguz/www-data/web2py/wsgihandler.py/test/default/images

so it seems i have a problem with apache configuration. But i don't know what 
it is.

I can see that web2py processes are created during the apache start up:

$ ps aux | grep web2py
oguz      2867  0.0  0.2  10508  4332 pts/0    S+   18:18   0:00 vim 
setup-web2py.sh
root      3158  0.0  0.1  10436  3896 pts/2    S+   18:54   0:00 vim 
vhosts.d/01_web2py_vhost.conf
apache    4356  0.0  0.3 168444  6476 ?        Sl   20:07   0:00 (wsgi:web2py)  
   -d /usr/lib/apache2/ -f /etc/apache2/httpd.conf -D DEFAULT_VHOST -D USERDIR 
-D PYTHON -D PHP5 -k start
apache    4370  0.0  0.3 168444  6468 ?        Sl   20:07   0:00 (wsgi:web2py)  
   -d /usr/lib/apache2/ -f /etc/apache2/httpd.conf -D DEFAULT_VHOST -D USERDIR 
-D PYTHON -D PHP5 -k start
apache    4392  0.0  0.3 168444  6468 ?        Sl   20:07   0:00 (wsgi:web2py)  
   -d /usr/lib/apache2/ -f /etc/apache2/httpd.conf -D DEFAULT_VHOST -D USERDIR 
-D PYTHON -D PHP5 -k start
apache    4410  0.0  0.3 168444  6468 ?        Sl   20:07   0:00 (wsgi:web2py)  
   -d /usr/lib/apache2/ -f /etc/apache2/httpd.conf -D DEFAULT_VHOST -D USERDIR 
-D PYTHON -D PHP5 -k start
apache    4428  0.0  0.3 168444  6468 ?        Sl   20:07   0:00 (wsgi:web2py)  
   -d /usr/lib/apache2/ -f /etc/apache2/httpd.conf -D DEFAULT_VHOST -D USERDIR 
-D PYTHON -D PHP5 -k start
apache    4747  0.0  1.0 146648 20928 pts/3    Sl   20:11   0:00 python2.5 
web2py.py -i 127.0.1.1 -p 8123 -a ozyyarim12
oguz      5014  0.0  0.0   3264   844 pts/5    S+   20:37   0:00 grep --color 
web2py

--

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.


Reply via email to