ChrisZieba/LogicPull

Forbidden - after logging in with admin/admin

Closed this issue · 3 comments

The result of logging in is this:

Error: Forbidden
    at Object.exports.error (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/utils.js:62:13)
    at Object.module.exports [as handle] (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/csrf.js:55:41)
    at next (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/proto.js:190:15)
    at Object.session [as handle] (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/session.js:301:7)
    at next (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/proto.js:190:15)
    at Object.methodOverride [as handle] (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:49:5)
    at next (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/proto.js:190:15)
    at multipart (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/multipart.js:60:27)
    at module.exports (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:57:9)
    at IncomingMessage.module.exports (/srv/www/LogicPull/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js:70:11)

I'm trying to make this work on Ubuntu 14.04.1, using Node v0.8.8 (trying to make the environment the same as yours).
I was following the server-installation tutorial and then local-installation and the same error happens in both installments.
Nginx and Varnish are working fine, AFAICS.

Thanks

Sounds like something is not configured properly in config.js, most likely base_vhost. Let's see what the config file looks like.

Thank you for responding so quickly.

You're right, when I changed 127.0.0.1 to localhost the error went away, but than another problem appeared. After I click on Login nothing happens, I see the page is refreshed but that's it.
Looking at devtools, I see that I get back 302, take a look:

image

image

Here's the relevant part of config.js:

// GENERAL

        // The port that nodeJS will listen on. This will be used in your Varnish and nginx configuration.
        server_port: "3000",

        // The home folder for the application. Must have a trailing slash!
        base_location: "/srv/www/LogicPull/",

        // The URL that will be used by the application.
        base_url: "http://localhost:3000",

        // If using virtual hosts, set a default/base. This used as the cookie domain to 
        // allow the user to stay logged in over multiple subdomains.
        base_vhost: "localhost",

        // The server mongodb is on. If ;127.0.0.1' does not work, try 'localhost'.
        mongo_host: "localhost",

        // The name of the database.
        mongo_db: "LogicPull",

        // The server port mongodb is using
        mongo_port: "27017",

        // The folder location of the Apache FOP binary. Make sure there is a trailing slash!
        fop_location: "/opt/fop-1.1/",

I believe the cookie domain being set to "localhost" is the problem here. Try adding a domain to your hosts file and using that instead.