uwsgi either creates the file, or it errors out and stops. It can't work 
otherwise if the script you used is that one.
Look into /etc/uwsgi/web2py.ini to see the socket path.

As a "good script", sorry, I refrain from anything not Debian-related as 
nightmares.... although nginx+uwsgi+web2py is one of the easiest setups 
around, because all of them are extensively documented.

On Tuesday, June 3, 2014 9:46:53 PM UTC+2, lesssugar wrote:
>
> Did as you wrote, but there were no errors in uwsgi logs. In the next step 
> nginx logged exactly the same error as described in my first post.
>
> I'm thinking of setting web2py up again, from scratch. Can you suggest a 
> good .sh script for that purpose? I use CentOS 6.4.
>
> Thanks for help.
>
> On Monday, June 2, 2014 2:00:51 PM UTC+2, Niphlod wrote:
>>
>> uhm, I see.
>> This script doesn't use host:port but a socket file for the "interaction" 
>> between nginx and uwsgi.
>> The first thing to do is be sure that uwsgi can create the file. You can 
>> check it with 
>>
>> /etc/init.d/uwsgi start
>>
>>
>> This should start the uwsgi process and report if any errors occurred. 
>> uwsgi log is in 
>>
>> /var/log/uwsgi/uwsgi.log
>>
>>
>> to check for futher errors.
>> Once uwsgi is ruled out, you can then check with 
>>
>> /etc/init.d/nginx
>>
>>
>> to start the nginx process and see if there are errors on the nginx side
>>
>> On Sunday, June 1, 2014 5:52:33 PM UTC+2, lesssugar wrote:
>>>
>>> I used the following script for the setup:
>>>
>>> http://web2py.googlecode.com/hg/scripts/setup-web2py-nginx-uwsgi-centos64.sh
>>>
>>> I tried recreating logs folder under /var/www/web2py/, restarting uwsgi 
>>> and nginx - unfortunately the error occurs. Do I need to add specific 
>>> permissions for the logs folder? No idea. Do I even need to use the 
>>> web2py.socket? Isn't "127.0.0.1:9001" enough as uwsgi_pass value?
>>>
>>> I have really small knowledge on the subject of configuring web2py on a 
>>> server, that's why I used the .sh script.
>>>
>>> On Saturday, May 31, 2014 5:59:05 PM UTC+2, Niphlod wrote:
>>>>
>>>> What did you do to install this setup ? having the socket inside 
>>>> /var/www is not something is usually done.
>>>> However, that error is nginx telling you that a socket you told him to 
>>>> listen to isn't there, so to fix the error I'd create the logs folder 
>>>> again 
>>>> and restart whatever process (supposedly uwsgi) creates that file.
>>>> The second step would be to review carefully the configuration ^_^
>>>>
>>>> On Saturday, May 31, 2014 2:30:22 PM UTC+2, lesssugar wrote:
>>>>>
>>>>> I'm using web2py's nginx + uwsgi + centos configuration and I 
>>>>> accidentally removed web2py/logs folder on my server. Now I get "502 bad 
>>>>> gateway" whenever I try to open my page.
>>>>>
>>>>> nginx error log:
>>>>>
>>>>> 2014/05/31 13:16:50 [crit] 762#0: *1052 connect() to 
>>>>> unix:///var/www/web2py/logs/web2py.socket failed (2: No such file or 
>>>>> directory) while connecting to upstream, client: xxx.xx.xxx.xxx, server: 
>>>>> xxx.com, request: "GET / HTTP/1.1", upstream: 
>>>>> "uwsgi://unix:///var/www/web2py/logs/web2py.socket:", host: "
>>>>> www.xxx.com"
>>>>>
>>>>> How can I restore web2py.socket file and get my website to work again? 
>>>>> Any help appreciated.
>>>>>
>>>>

-- 
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.

Reply via email to