Thank you for reply!

I tried:

apt-get remove libapache2-mod-wsgi
#
/usr/local/src
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
tar -zxvf mod_wsgi-3.3.tar.gz
cd mod_wsgi-3.3
vi mod_wsgi.c

Change:
#if defined(MPM_ITK)
        if (chown(process->socket, process->uid, -1) < 0) {
#else
        if (chown(process->socket, ap_unixd_config.user_id, -1) < 0) {
#endif

to:

/ * #if defined(MPM_ITK) */
        if (chown(process->socket, process->uid, -1) < 0) {
/* #else
        if (chown(process->socket, ap_unixd_config.user_id, -1) < 0) {
#endif */

apt-get install apache2-threaded-dev python-dev checkinstall
#
./configure
make
#
checkinstall --pkgname=mod_wsgi --pkgversion "3.3.release`date +%Y%m%d`" 
--backup=no --install=no --defaul
#
dpkg -i mod-wsgi_3.3.release20120720-1_amd64.deb
#
a2enmod wsgi
service apache2 restart

And I got the errors:
 * Starting web server 
apache2                                                                         
                                                      
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.


[Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=393): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=395): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=396): Unable to change working directory to '/home/www-moin'.

killall apache2
service apache2 start

And now

srwx------  1 www-moin root       0 Jul 20 20:08 moin.13173.0.1.sock
>

Now it works! Great!

But I can see in Apache error log:
[Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=13628): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=13629): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=13630): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 20:15:21 2012] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.6.17 
PHP/5.3.10-1ubuntu3.2 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 
mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=13631): Unable to change working directory to '/home/www-moin'.
[Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi 
(pid=13632): Unable to change working directory to '/home/www-moin'.

My user was created with:

> useradd --shell /bin/false --no-create-home www-moin
>
> Maybe is possible to fix this ? 


On Friday, July 20, 2012 4:55:29 PM UTC+3, slech wrote:
>
> Hello Everyone.
> I have an issue to install moin wiki with mod_ruid.
> Moin wiki is python based app and I start it via Apache and mod_wsgi.
> All work fine without mod_ruid2. And also work fine if I manually change 
> permission to the */var/run/wsgi/moin.32282.0.1.sock* file
>
>> chown www-moin:www-moin /var/run/wsgi/moin.32282.0.1.sock
>>
> or
>
>> chmod 777 /var/run/wsgi/moin.32282.0.1.sock
>>
>
> After restart permission changed and it looks:
>
>> srwx------  1 www-data root       0 Jul 20 16:42 moin.32282.0.1.sock
>>
>
> My Apache config related settings:
>
>>         RMode config
>>         RUidGid www-moin www-moin
>>         RGroups www-moin
>>
>>         WSGIScriptAlias /web/production/moin/wm/moin.wsgi
>>         WSGIDaemonProcess moin user=www-moin group=www-moin processes=5 
>> threads=10 maximum-requests=1000 umask=0007
>>         WSGIProcessGroup moin
>>
>
> As I understand wsgi process start as Apache user (in my case www-moin) 
> but maybe at first run(restart, reload) it starts as default Apache user ?
>
> My question is how I can change sock file default permissions ?
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/0an-R_sO9WAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to