这是indexloc提供的服务,不要输入任何密码
Skip to content

App available on all subdomains (plus root) #650

@yazinsai

Description

@yazinsai

I have a Rails app deployed to example.com (with namespaced subdomains defined for api.example.com and dashboard.example.com).

They all work fine .. but visiting foo.example.com displays the example.com site.

I tried the solution offered in #423 (shown below), and then reseting nginx - but that didn't resolve the problem:

Try creating a /etc/nginx/sites-available/default with the following contents:

server {
    listen [::]:80 default_server;
    listen 80 default_server;
    root /usr/share/nginx/html;
    index index.html;
    server_name _;
}

I have the following DNS entries:

A   example.com   1.2.3.4
A *.example.com   1.2.3.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions