Portal not found

I’m trying to install Tyk on-premise on an Ubuntu machine.

I’ve followed the ubuntu install guide to the letter.

The dashboard is successfully set up, and reachable through local-ip:3000
I have created a simple API and redirected it to httpbin

I have created a policy and included that API, I have added an API to the catalogue, referencing the policy. I have added several pages and for one the “make homepage” checkbox was checked.

When I click the ‘portal’ button, I get forwarded to
local-ip:3000/5ae08d7e33253205539cbcd9/portal/
and get presented with a ‘not found’.

I’ve also tried
local-ip:3000/portal/
but that also returned a ‘not found’.

I’ve also tried adding portal.mydomain.com to my hosts file, referencing the local-ip, and did the same on the server that’s hosting Tyk.

I tried replacing local-ip with portal.mydomain.com in the above urls but still ‘not found’.

Your FAQ lists this issue, but doesn’t really tell me how to solve this. (Okay… I need to correctly configure it…, but how?).

Below is my tyk_analytics.conf for reference:

{
    "listen_port": 3000,
    "tyk_api_config": {
        "Host": "http://localhost",
        "Port": "8080",
        "Secret": "352d20ee67be67f6340b4c0605b044b7"
    },
    "mongo_url": "mongodb://127.0.0.1/tyk_analytics",
    "mongo_use_ssl": false,
    "mongo_ssl_insecure_skip_verify": false,
    "page_size": 10,
    "admin_secret": "12345",
    "shared_node_secret": "352d20ee67be67f6340b4c0605b044b7",
    "redis_port": 6379,
    "redis_host": "localhost",
    "redis_password": "",
    "enable_cluster": false,
    "redis_use_ssl": false,
    "RedisSSLInsecureSkipVerify": false,
    "force_api_defaults": false,
    "notify_on_change": true,
    "license_key": "...."
    "redis_database": 0,
    "redis_hosts": null,
    "hash_keys": true,
    "email_backend": {
        "enable_email_notifications": false,
        "code": "",
        "settings": null,
        "default_from_email": "",
        "default_from_name": "",
        "dashboard_hostname": ""
    },
    "hide_listen_path": false,
    "sentry_code": "",
    "sentry_js_code": "",
    "use_sentry": false,
    "enable_master_keys": false,
    "enable_duplicate_slugs": true,
    "show_org_id": true,
    "host_config": {
        "enable_host_names": true,
        "disable_org_slug_prefix": true,
        "hostname": "portal.mydomain.com",
        "override_hostname": "tyk",
        "portal_domains": {},
        "portal_root_path": "/portal",
        "generate_secure_paths": false,
        "secure_cookies": false,
        "use_strict_hostmatch": false
    },
    "http_server_options": {
        "use_ssl": false,
        "certificates": [
            {
                "domain_name": "",
                "cert_file": "",
                "key_file": ""
            }
        ],
        "min_version": 0
    },
    "security": {
        "allow_admin_reset_password": false,
        "login_failure_username_limit": 0,
        "login_failure_ip_limit": 0,
        "login_failure_expiration": 0,
        "audit_log_path": ""
    },
    "ui": {
        "languages": {
            "Chinese": "cn",
            "English": "en",
            "French": "fr",
            "Korean": "ko"
        },
        "hide_help": false,
		"default_lang": "en",
        "login_page": {},
        "nav": {},
        "uptime": {},
        "portal_section": null,
        "designer": {},
        "dont_show_admin_sockets": false,
        "dont_allow_license_management": false,
        "dont_allow_license_management_view": false,
        "cloud": false
    },
    "home_dir": "/opt/tyk-dashboard",
    "identity_broker": {
        "enabled": false,
        "host": {
            "connection_string": "http://localhost:3010",
            "secret": "934893845123491238192381486djfhr87234827348"
        }
    },
    "tagging_options": {
        "tag_all_apis_by_org": false
    },
    "use_sharded_analytics": false,
    "enable_aggregate_lookups": true,
    "enable_analytics_cache": false,
    "aggregate_lookup_cutoff": "01/07/2016",
	"maintenance_mode": false,
    "allow_explicit_policy_id": false,
    "private_key_path": "",
    "node_schema_path": "",
    "oauth_redirect_uri_separator": ";",
    "statsd_connection_string": "",
    "statsd_prefix": "",
    "disable_parallel_sessions": false,
    "dashboard_session_lifetime": 0,
    "alternative_dashboard_url": "",
    "sso_permission_defaults": null,
    "sso_custom_login_url": "",
    "sso_custom_portal_login_url": "",
    "notifications_listen_port": 5000,
    "portal_session_lifetime": 0,
    "enable_delete_key_by_hash": false
}

Please advise.

Hi

have you set your portal domain from the dashboard homepage? You can see what it is set to if you inspect your organisation object in mongo, if for some reason it isn’t being set properly.

Hi Josh,

Yes, I’ve set the portal domain using the dashboard.

If I’m inspecting the organisation object in mongo this seems to be set correctly.

> db.tyk_organisations.find().pretty()
{
    "_id" : ObjectId("5ae08d7e33253205539cbcd9"),
    "owner_name" : "Default Org.",
    "owner_slug" : "default",
    "cname_enabled" : true,
    "cname" : "portal.mydomain.com",
    "apis" : [
            {
                    "api_human_name" : "TEST #Media #Sharing",
                    "api_id" : "943dff58feb04ff27de5fe5bd8907311"
            },
            {
                    "api_human_name" : "AUTH #Sharing #auth",
                    "api_id" : "94c70e3dc27a446b7352433af2264af9"
            }
    ],
    "developer_quota" : 0,
    "developer_count" : 0,
    "event_options" : {

    },
    "hybrid_enabled" : false,
    "ui" : {
            "languages" : {

            },
            "hide_help" : false,
            "default_lang" : "",
            "login_page" : {

            },
            "nav" : {

            },
            "uptime" : {

            },
            "portal_section" : {

            },
            "designer" : {

            },
            "dont_show_admin_sockets" : false,
            "dont_allow_license_management" : false,
            "dont_allow_license_management_view" : false,
            "cloud" : false
    },
    "org_options_meta" : {

    }
}