Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx setup? #39

Open
w33zy opened this issue Sep 21, 2014 · 14 comments
Open

Nginx setup? #39

w33zy opened this issue Sep 21, 2014 · 14 comments

Comments

@w33zy
Copy link

w33zy commented Sep 21, 2014

Do you have any specific instructions or information on configuring the app to work with Nginx? I am getting a 502 error with my setup

@dvdpearson
Copy link
Contributor

Could you please provide us Nginx log file, located by default in /var/log/nginx/nginx_error.log ?

@w33zy
Copy link
Author

w33zy commented Sep 23, 2014

Here is the nginx error i got. I only masked the domain and ip. Also the 92five app is sitting beside several WordPress sites being served by Nginx. So I am reluctant to try the solutions that I see on StackOverflow

2014/09/23 14:25:45 [crit] 11433#0: *41354 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 184.176.244.217, server: project.website.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "project.website.com"
2014/09/23 14:28:50 [crit] 11433#0: *41366 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 184.176.244.217, server: project.website.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "project.website.com"

@Chaosbit
Copy link

What Distro is running on the server? Can you post your nginx config for the site?

@dvdpearson
Copy link
Contributor

As @Chaosbit said, it would be easier for us to investigate with your configuration.

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

I am running Ubuntu 12.04.4 LTS

Here is a copy of my server block

server {

    server_name project.website.com www.project.website.com;

    access_log   /var/log/nginx/project.website.com.access.log rt_cache;
    error_log    /var/log/nginx/project.website.com.error.log;

    root /var/www/project.website.com/htdocs;
    index index.php index.htm index.html;



    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }   

    include common/php.conf;
    include common/locations.conf;

}

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

So my Nginx setup to run php5-fpm on 127.0.0.1:9000 not unix:/var/run/php5-fpm.sock.

I editted the location block and now I am getting the Whoops, looks like something went wrong error

@Chaosbit
Copy link

In which step?

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

Just visiting the homepage gives me this error

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

I enabled debug mode and saw that it was a file write error. I ended up setting /storage/.. to 0777 in trying to troubleshoot the error.

Can we get more specific details on the chmod/permission values for folders and files?

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

This is the furthest I have reached http://project.website.com/install/adminaccount, then I get the Oops Something went wrong error.

Passed that step. Am I correcting assuming that when the docs say make a folder or file 'writable', it means setting the permission to 0777

@chintanbanugaria
Copy link
Owner

Sorry guys had been busy so couldn't able to participate in the discussion. @w33zy Either 0777 or 0755 according to your configuration. Exactly where have you been stuck. @dvdpearson and @Chaosbit Thanks guys for answering while I wasn't there. :)

@w33zy
Copy link
Author

w33zy commented Sep 24, 2014

@chintanbanugaria I got it working only after setting most folders to 0777 recursively.

BTW... is it possible to change the user avatar pic? My admin account is using the 'CB' avatar pic

@chintanbanugaria
Copy link
Owner

@w33zy Actually I am working on that. Currently you can replace your avataar manually. The profile pics are located at assets/images/profilepics.
Please make sure that your image has a png extension and 128 x128 of dimenstion.

@lancepioch
Copy link
Contributor

For the original issue, I've created wiki instructions, found here: https://github.com/chintanbanugaria/92five/wiki/Installation-Instructions#nginx

The original issue can be closed. If there's anymore problems, separate issues can be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants