Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

help a newbie (me) debug my local GF install attempt?

Hello,

Was wondering if someone might help me figure out where I went wrong when trying to follow the instructions here: https://github.com/JasonBarnabe/greasyfork/wiki/Running-Greasy-Fork-locally

I think things are pretty clearly not working since when I try to go to http://localhost:3306/ (I think? that's where I'm supposed to go to see the instance running), I get text like the following (with the black-diamond-question-marks and all):
[���
5.7.13-0ubuntu0.16.04.2�.���> 5%U@72�ÿ÷�ÿ����������*K"OR)~f5FH�mysql_native_password���ÿ„Got packets out of order
I think most of the steps I was able to get through eventually except for bin/delayed_job, which gives me a "no command given" error. Also, I'm not sure that I fulfill the requirement of having Java on this VM (or how to get it if not).

Any help would be appreciated. Thanks!

Bình luận

  • Looks like an encoding issue. I've never set up gf myself, so I can only guess: maybe your HTTP server didn't use utf8.

  • Thanks for the reply, wOxxOm! I'm not sure how to figure out if my server didn't use utf8. I was trying to search for more info based on the text I was getting above, and it appears that maybe :3306 is perhaps just the port for mysql. I'm not sure what the port for the GF website is supposed to be on though. I tried a bunch of different things, but most give the "Unable to connect" error, and 80 or just "localhost" gives a generic "Welcome to gninx!" message, so I'm not sure which of the 10000 or so ports I should perhaps look for it at. :smiley:

    (p.s. I think the bin/delayed_job problem was that it needed to be bin/delayed_job start, so I updated the wiki)
  • 3306 is definitely not the port you want. You want 80 if you're running nginx.

    I realize now I forgot to include the configuration for nginx in the install instructions. That is very required. As mentioned on GitHub, you can run "rails server" instead (port 3000). Or try this as your nginx config (with the various file paths corrected):

    server {
    listen 80;
    server_name greasyfork.local sleazyfork.local;

    root /www/greasyfork/public;
    passenger_enabled on;
    passenger_min_instances 1;

    passenger_ruby /home/jason/.rvm/gems/ruby-2.3.1@greasyfork/wrappers/ruby;
    #passenger_app_env production;
    client_max_body_size 5m;

    add_header Access-Control-Allow-Origin "*";
    add_header Strict-Transport-Security max-age=31536000;

    #location ~ ^/assets/ {
    # expires 1y;
    # add_header Cache-Control public;
    # gzip_static on;
    # add_header ETag "";
    # break;
    #}

    location ~ ^/libraries/ {
    passenger_enabled off;
    expires 1y;
    add_header Cache-Control public;
    gzip_static on;
    add_header ETag "";
    autoindex on;
    break;
    }

    location ~ ^/data/ {
    passenger_enabled off;
    expires 1y;
    add_header Cache-Control public;
    gzip_static on;
    add_header ETag "";
    autoindex on;
    break;
    }


    rewrite_log on;
    error_log /opt/nginx/logs/error.log notice;

    # Add trailing slash to paths like /forum and /en/forum
    rewrite ^(/[a-z][a-z](\-[A-Z][A-Z])?)?/forum$ $request_uri/ permanent;

    # Rewrite locale path segment to be a request parameter
    location ~* ^(?:/([a-z][a-z](?:\-[A-Z][A-Z])?))/forum/ {
    set $args $args&locale=$1;
    rewrite ^(?:/[a-z][a-z](?:\-[A-Z][A-Z])?)/forum/(.*) /forum/$1 last;
    }

    location /forum/ {
    index index.php;
    try_files $uri $uri/ @forum;
    passenger_enabled off;

    # Stop things from executing in the uploads directory
    location ~* ^/uploads/.*.(html|htm|shtml|php)$ {
    types { }
    default_type text/plain;
    }

    location ~ /forum/\. { access_log off; log_not_found off; deny all; }
    location ~ ~$ { access_log off; log_not_found off; deny all; }
    location ^~ /forum/conf/ { internal; }

    location ~ /forum/.*\.php {
    include fastcgi.conf;
    try_files $uri =404; # This is not needed if you have cgi.fix_pathinfo = 0$
    # include locale as path segment
    fastcgi_param PHP_VALUE "auto_prepend_file=$document_root/forum/plugins/LanguageByPath/prepend.php";
    fastcgi_pass 127.0.0.1:9000;
    }

    }

    location @forum {
    autoindex off;
    passenger_enabled off;
    rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;
    }

    location ~ /forum/.*\.php {
    include fastcgi.conf;
    passenger_enabled off;
    try_files $uri =404; # This is not needed if you have cgi.fix_pathinfo = 0$
    fastcgi_pass 127.0.0.1:9000;
    }


    }
  • Thanks, Jason! I did try to edit my nginx configuration with an edited version of your above code, but couldn't get it to work. However, as noted in GitHub, rails server got the site up and mostly running for me. Thanks!
Đăng nhập hoặc Đăng ký để gửi bình luận.