voten-co / voten

The code that powers voten.co
https://voten.co
Apache License 2.0
1.26k stars 231 forks source link

Installation Steps Questions #356

Closed vg-github closed 5 years ago

vg-github commented 5 years ago

1) I'm trying to edit .env and I've few fields I don't know how to populate.

ECHO_HOST=https://echo.voten.co
ECHO_PORT=6001
ECHO_BEARER_TOKEN=
ECHO_APP_ID=
ECHO_AUTH_KEY=

I can't figure out what goes in here, where do I get these values from?

FTP_HOST=0.0.0.0
FTP_PORT=21
FTP_USERNAME=
FTP_PASSWORD=
CDN_URL=https://cdn.voten.co/
FTP_ROOT=/

What is the purpose of the FTP credentials, and should these files uploaded be available via HTTP under CDN_URL?

DO_SPACES_KEY=
DO_SPACES_SECRET=
DO_SPACES_ENDPOINT=https://nyc3.digitaloceanspaces.com
DO_SPACES_REGION=nyc3
DO_SPACES_BUCKET=

Are these necessary, or are they an alternative to the FTP credentials?

2) When I navigate to /backend, I get 404 from nginx, what could be the problem? I see a .htaccess file in the public/ folder, but that doesn't seem to apply for nginx.

Any help is appreciated.

saleh-old commented 5 years ago

You'll need ECHO if you're using laravel-echo to get the real-time stuff working. I suggest using Pusher instead. (if you don't know any of the names above just google them)

DO_SPACES is no longer supported. I should've deleted them.

You need FTP to get the file uploading working. FTP is the driver used on Voten for storage.

When I navigate to /backend, I get 404 from nginx, what could be the problem? I see a .htaccess file in the public/ folder, but that doesn't seem to apply for nginx.

Forget the .htaccess file. Do the other addresses work?

vg-github commented 5 years ago

OK, I understand. The other addresses don't work, e.g. /login/google, do I need to setup anything in nginx?

BoKKeR commented 5 years ago

What is the error you are getting? redirect has to be enabled in nginx for routes

vg-github commented 5 years ago

I am getting 404 Not Found. My nginx config file looks like this:

server {
        root /var/www/html/public;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name hidden.com www.hidden.com;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php7.1-fpm.sock;
        }
        location ~ /\.ht {
                deny all;
        }

... SSL Configuration Here...
}

The landing page works fine, and navigating to Terms and Conditions or Privacy Policy works OK. I think only the dynamic links are not working, such as /backend and /login/google

BoKKeR commented 5 years ago

try this:

try_files $uri $uri/ /index.php?$args;

vg-github commented 5 years ago

that worked. Many thanks!