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

Login/Register 404 #16

Closed
weinzach opened this issue Sep 13, 2017 · 11 comments
Closed

Login/Register 404 #16

weinzach opened this issue Sep 13, 2017 · 11 comments
Assignees

Comments

@weinzach
Copy link

Hi,

I'm currently setting up this system for use at my game at Florida Polytechnic University. I seem to have followed all the right steps but when I either login or register I get a 404 page. You can see my site at http://play.hvzpoly.org/ . The team here is fluent in NodeJs and we'd love to help out in improving this system. We're just stuck at this bump getting it up and running. Thanks again!

"Woah, there doesn't seem to be anything here! 404
If you think this is in error, please let an administrator know!"

@redxdev redxdev self-assigned this Sep 13, 2017
@redxdev
Copy link
Owner

redxdev commented Sep 13, 2017

Ah, I see what happened. You need to make sure that requests going to http://play.hvzpoly.org/auth/* go to the server and aren't handled by the ember client.

More generally, the following paths should be handled by the server and should not result in the ember client being served to the browser:

  • /api/*
  • /auth/*

The full list of routes can be found here: https://github.com/redxdev/hvzsite/blob/master/server/config/routes.js

Notice that all of them (except /auth routes) start with /api, and at the end if nothing matches it just serves the ember client files.

Let me know if you need further help.

@redxdev redxdev closed this as completed Sep 13, 2017
@weinzach
Copy link
Author

So right now I route with a proxy through apache on play.hvzpoly.org to the ember server. I need to set /api and /auth to direct to sails?

@redxdev
Copy link
Owner

redxdev commented Sep 13, 2017

Exactly.

@weinzach
Copy link
Author

Okay I set that up. I'm getting "The requested file does not exist."

@redxdev
Copy link
Owner

redxdev commented Sep 13, 2017

This looks like a configuration error on your side. You are running sails on port 1337 - check your sails config (local.js) to make sure hvz.url is set correctly.

Ideally you want apache proxying calls to sails on the /api and /auth routes and then you have ember built into a set of static files that can be served by apache itself - then you won't have to deal with any port weirdness (plus you get benefits of only having to serve static files for assets)

@weinzach
Copy link
Author

weinzach commented Sep 13, 2017

The url is http://play.hvzpoly.org should it be http://play.hvzpoly.org:1337 ?

UPDATE: THAT DID THE TRICK!!! We're gonna get to customizing everything and keep you in the loop on what we got so far. Thanks again.

@redxdev
Copy link
Owner

redxdev commented Sep 13, 2017 via email

@weinzach
Copy link
Author

weinzach commented Sep 14, 2017

Okay so I setup apache hosting the compiled ember pages. So its just apache sails. This is what my virtual host is in apache

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass /api http://localhost:1337
    ProxyPassReverse /api http://localhost:1337
    ProxyPass /auth http://localhost:1337
    ProxyPassReverse /auth http://localhost:1337
    ServerAdmin support@tekwik.com
    DocumentRoot /var/www/sites/hvz_engine
    ServerName play.hvzpoly.org
</VirtualHost>

I'm gonna do https so I can have the webcam working. But I'm first trying to get sails working so it's all working on play.hvzpoly.org. I put the config back to just http://play.hvzpoly.org/ in the sails local.js. I'm wondering what I can do to let apache pass through while preserving the domain so I can use https. any advice. Sails still reports "The requested file does not exist.". Thanks!

@redxdev
Copy link
Owner

redxdev commented Sep 14, 2017

Huh. I'm actually in the middle of running a game right this minute so I'll get back to you when I have a chance.

@weinzach
Copy link
Author

Never mind problem solved.

@redxdev
Copy link
Owner

redxdev commented Sep 14, 2017 via email

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

2 participants