LycheeOrg / Lychee-v3

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Home Page:https://lycheeorg.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep getting 502 error from php/index.php

BrainJogger opened this issue · comments

Hey!

I keep getting 502 from the php/index.php and don't know why.
Is running on nginx (custom port).

Do you have a tip for me?
lychee

I don't use Nginx, so I can't help you, sorry. Maybe @d7415 or @kamil4 can give you a look ?

Only the usual:

  • Check nginx log
  • Check php log
commented

I just set up Lychee today with my nginx vagrant box. I'm running vvv with vagrant and I just used the default WordPress nginx confs. Here's those configs with the WordPress specific stuff removed. Here: https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/config/nginx-config/nginx-wp-common.conf for reference:

server {
  listen 80;
  listen 443 ssl;
  server_name your_site_name.test;
  root your_path_to_site;
  location / {
      index index.php index.html;
      try_files $uri $uri/ /index.php$is_args$args;
  }
  charset utf-8;
  # this prevents hidden files (beginning with a period) from being served
  location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
  }
  location ~ \.php$ {
    # Try the files specified in order. In our case, try the requested URI and if
    # that fails, try (successfully) to pass a 404 error.
    try_files      $uri =404;
    # Include the fastcgi_params defaults provided by nginx. Check that this is correct location
    include        /etc/nginx/fastcgi_params;

    # The amount of time for upstream to wait for a fastcgi process to send data.
    # We keep this *extremely* high so that one can be lazy when remote debugging.
    fastcgi_read_timeout 3600s;

    # Buffer size for reading the header of the backend FastCGI process.
    fastcgi_buffer_size 128k;

    fastcgi_buffers 4 128k;

    # SCRIPT_FILENAME is a required parameter for things to work properly
    fastcgi_param   SCRIPT_FILENAME         $document_root$fastcgi_script_name;

    # Depending on your install, php version, etc
    fastcgi_pass unix:/var/run/php7.0-fpm.sock;

    fastcgi_index  index.php;
  }

}

I just successfully set up Lychee with Nginx. I had the same error, but fixed it. The problem for me was simple. I had the wrong information on this line:
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
I recommend going back and looking at yours. For me the path was actually:
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
This is because I'm using php 7.3. Double check this to see if it gets yours working.

Hope that helps.

Seems to be fixed.