[GH-ISSUE #102] Connection to service failed after install #88

Closed
opened 2026-02-26 01:35:08 +03:00 by kerem · 11 comments
Owner

Originally created by @1337sup3rh4x0r on GitHub (Oct 16, 2014).
Original GitHub issue: https://github.com/JLiscom/OpenNote/issues/102

Hi there,
After installing opennote on nginx I only get a login button but no register button. Also after loading the page I get the error message "Connection to service failed" and the nginx log shows the message

2014/10/16 13:12:39 [error] 21400#0: *11 "/var/www_opennote/Service/service.php/config/index.html" is not found (20: Not a directory), client: 192.168.217.41, server: , request: "GET /Service/service.php/config/ HTTP/1.1", host: "192.168.217.201:444", referrer: "https://192.168.217.201:444/"

Originally created by @1337sup3rh4x0r on GitHub (Oct 16, 2014). Original GitHub issue: https://github.com/JLiscom/OpenNote/issues/102 Hi there, After installing opennote on nginx I only get a login button but no register button. Also after loading the page I get the error message "Connection to service failed" and the nginx log shows the message 2014/10/16 13:12:39 [error] 21400#0: *11 "/var/www_opennote/Service/service.php/config/index.html" is not found (20: Not a directory), client: 192.168.217.41, server: , request: "GET /Service/service.php/config/ HTTP/1.1", host: "192.168.217.201:444", referrer: "https://192.168.217.201:444/"
kerem closed this issue 2026-02-26 01:35:08 +03:00
Author
Owner

@JLiscom commented on GitHub (Oct 16, 2014):

Do you have php installed on the webserver?

<!-- gh-comment-id:59433772 --> @JLiscom commented on GitHub (Oct 16, 2014): Do you have php installed on the webserver?
Author
Owner

@1337sup3rh4x0r commented on GitHub (Oct 17, 2014):

Yes, I have!

My nginx config looks like this:

server {
    listen 444 ssl;
    ssl_certificate     bla.crt;
    ssl_certificate_key bla.key;
    set $root_path "/var/www_opennote";
    root $root_path;
    set $socket "unix:/var/run/fpm-00796029-695b-475a-a87c-f2b25af36486.sock";
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass $socket;
        fastcgi_index index.php;
        include fastcgi_params;
    }
    access_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-access.log;
    error_log  /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-error.log;
    large_client_header_buffers 4 32k;
}
<!-- gh-comment-id:59484870 --> @1337sup3rh4x0r commented on GitHub (Oct 17, 2014): Yes, I have! My nginx config looks like this: ``` server { listen 444 ssl; ssl_certificate bla.crt; ssl_certificate_key bla.key; set $root_path "/var/www_opennote"; root $root_path; set $socket "unix:/var/run/fpm-00796029-695b-475a-a87c-f2b25af36486.sock"; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass $socket; fastcgi_index index.php; include fastcgi_params; } access_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-access.log; error_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-error.log; large_client_header_buffers 4 32k; } ```
Author
Owner

@JLiscom commented on GitHub (Oct 17, 2014):

I know whats wrong but I don't know how to fix it.

Your error show the application is requesting Service/service.php/config/index.html when it should be requesting Service/service.php/config/.

It appears ngix is adding the index.html to Service/service.php/config/

I do not know how to fix that.

<!-- gh-comment-id:59575955 --> @JLiscom commented on GitHub (Oct 17, 2014): I know whats wrong but I don't know how to fix it. Your error show the application is requesting `Service/service.php/config/index.html` when it should be requesting `Service/service.php/config/`. It appears ngix is adding the `index.html` to `Service/service.php/config/` I do not know how to fix that.
Author
Owner

@JLiscom commented on GitHub (Oct 17, 2014):

http://nginx.org/en/docs/http/ngx_http_autoindex_module.html

maybe turn auto index off????

<!-- gh-comment-id:59576104 --> @JLiscom commented on GitHub (Oct 17, 2014): http://nginx.org/en/docs/http/ngx_http_autoindex_module.html maybe turn auto index off????
Author
Owner

@1337sup3rh4x0r commented on GitHub (Oct 18, 2014):

Thank you for looking into this!
When I add

location / {
    autoindex off;
}

nothing changes.
Or what should I put behind "location"?

<!-- gh-comment-id:59616481 --> @1337sup3rh4x0r commented on GitHub (Oct 18, 2014): Thank you for looking into this! When I add ``` location / { autoindex off; } ``` nothing changes. Or what should I put behind "location"?
Author
Owner

@JLiscom commented on GitHub (Oct 19, 2014):

@Killer1337 I don't know. I am an Apache guy.
The problem appears ngix is adding the index.html to Service/service.php/config/

You will need to figure out how to turn that behavior off.

<!-- gh-comment-id:59634426 --> @JLiscom commented on GitHub (Oct 19, 2014): @Killer1337 I don't know. I am an Apache guy. The problem appears ngix is adding the `index.html` to `Service/service.php/config/` You will need to figure out how to turn that behavior off.
Author
Owner

@1337sup3rh4x0r commented on GitHub (Oct 19, 2014):

Over at nginx forum I got help and straightened out my config. It now reads:

server {
    listen 444 ssl;
    ssl_certificate     bla.crt;
    ssl_certificate_key bla.key;
    set $root_path "/var/www_opennote";
    root $root_path;
    set $socket "unix:/var/run/fpm-00796029-695b-475a-a87c-f2b25af36486.sock";
    access_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-access.log;
    error_log  /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-error.log;
    large_client_header_buffers 4 32k;
    location ~ ^(.+\.php)(/.+)$ {
        fastcgi_split_path_info       ^(.+\.php)(.*)$;
        fastcgi_pass $socket;
        fastcgi_index index.php;
        include fastcgi_params;
}
client_max_body_size 20M;
}

Changing the stuff behind location was the key :)

From chrome I can now create a profile and log in ok.
However on Firefox I get the message "Credentials accepted" but I am not redirected after that. I am stuck with looking at the login and register buttons.

Do you have any clue what that might be?

<!-- gh-comment-id:59641053 --> @1337sup3rh4x0r commented on GitHub (Oct 19, 2014): Over at nginx forum I got help and straightened out my config. It now reads: ``` server { listen 444 ssl; ssl_certificate bla.crt; ssl_certificate_key bla.key; set $root_path "/var/www_opennote"; root $root_path; set $socket "unix:/var/run/fpm-00796029-695b-475a-a87c-f2b25af36486.sock"; access_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-access.log; error_log /var/log/nginx/160232e2-896f-4d3b-9fec-1e08058c2bc2-error.log; large_client_header_buffers 4 32k; location ~ ^(.+\.php)(/.+)$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass $socket; fastcgi_index index.php; include fastcgi_params; } client_max_body_size 20M; } ``` Changing the stuff behind location was the key :) From chrome I can now create a profile and log in ok. However on Firefox I get the message "Credentials accepted" but I am not redirected after that. I am stuck with looking at the login and register buttons. Do you have any clue what that might be?
Author
Owner

@JLiscom commented on GitHub (Oct 19, 2014):

Can you provide your install url? There is this issue going on https://github.com/FoxUSA/OpenNote/issues/84 with Firefox I cannot seem to replicate.

<!-- gh-comment-id:59653927 --> @JLiscom commented on GitHub (Oct 19, 2014): Can you provide your install url? There is this issue going on https://github.com/FoxUSA/OpenNote/issues/84 with Firefox I cannot seem to replicate.
Author
Owner

@JLiscom commented on GitHub (Oct 19, 2014):

@Killer1337

May have found the issue. Try implementing this change
github.com/FoxUSA/OpenNote@c8916ea54a

<!-- gh-comment-id:59654214 --> @JLiscom commented on GitHub (Oct 19, 2014): @Killer1337 May have found the issue. Try implementing this change https://github.com/FoxUSA/OpenNote/commit/c8916ea54a6f77fa2285428c573dc7c88e7d4bed
Author
Owner

@1337sup3rh4x0r commented on GitHub (Oct 20, 2014):

After a quick glance it looks like this solved the problem.
Thank you very much!

<!-- gh-comment-id:59726714 --> @1337sup3rh4x0r commented on GitHub (Oct 20, 2014): After a quick glance it looks like this solved the problem. Thank you very much!
Author
Owner

@D3Hunter commented on GitHub (Oct 20, 2014):

Better use "include fastcgi.conf" instead of "include fastcgi_params", as "fastcgi_param SCRIPT_FILENAME" is removed from fastcgi_params in new version of nginx, because of which nginx'll send wrong request to php5-fpm and register button won't show up.

<!-- gh-comment-id:59733597 --> @D3Hunter commented on GitHub (Oct 20, 2014): Better use "include fastcgi.conf" instead of "include fastcgi_params", as "fastcgi_param SCRIPT_FILENAME" is removed from fastcgi_params in new version of nginx, because of which nginx'll send wrong request to php5-fpm and register button won't show up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OpenNote-JLiscom#88
No description provided.