subdomain

Rails 4, subdomain routing

被刻印的时光 ゝ 提交于 2021-02-18 07:22:48
问题 Trying to implement web service in rails through API sub-domain called "api". In my hosts file i added line: 127.0.0.1 api.localhost In my routes.rb i set sub-domain, where i only need index action and few manually added restful routes, through following: namespace :api, path: '', :constraints => {:subdomain => "api"} do resources :posts, only: :index do collection do get 'popular_by_day' get 'popular_by_week' end end end Also generated coresponding controller with: rails g controller api

Wildcard certificate not valid for mydomain.com

a 夏天 提交于 2021-02-17 03:50:44
问题 I created Wildcard certificate to support my site domain and subdomains. The new certificate works for my subdomains (e.g www.mydomain.com , sub.mydomain.com) But when I try to get to mydomain.com I get certificate warning: "the certificate is only valid for *.mydomain.com" Is it a problem with my configuration or just the Wildcard certificate doesn't support it? 回答1: For supporting both example.com and subdomain.example.com the certificate needs to include both *.example.com and example.com

Powerdns Subdomain & Delegation

爱⌒轻易说出口 提交于 2021-02-10 23:54:27
问题 I'm using PowerDNS authoritative server and pdns-mysql-backend. And I 'm trying to create a subdomain and delegate the external NS to it. But I can't find a proper doc or example for it. I just need to create NS records for subdomain? 1. existing domain is "example.com" 2. sub-domain that I want to create is "test.example.com" 3. external NS is "ns1.book.com" and I have created records to mysql like below. "domains table" id |name |master |last_check | type |notified_serial | account --------

Powerdns Subdomain & Delegation

依然范特西╮ 提交于 2021-02-10 23:52:03
问题 I'm using PowerDNS authoritative server and pdns-mysql-backend. And I 'm trying to create a subdomain and delegate the external NS to it. But I can't find a proper doc or example for it. I just need to create NS records for subdomain? 1. existing domain is "example.com" 2. sub-domain that I want to create is "test.example.com" 3. external NS is "ns1.book.com" and I have created records to mysql like below. "domains table" id |name |master |last_check | type |notified_serial | account --------

Powerdns Subdomain & Delegation

自闭症网瘾萝莉.ら 提交于 2021-02-10 23:49:27
问题 I'm using PowerDNS authoritative server and pdns-mysql-backend. And I 'm trying to create a subdomain and delegate the external NS to it. But I can't find a proper doc or example for it. I just need to create NS records for subdomain? 1. existing domain is "example.com" 2. sub-domain that I want to create is "test.example.com" 3. external NS is "ns1.book.com" and I have created records to mysql like below. "domains table" id |name |master |last_check | type |notified_serial | account --------

Nginx: How to match ONLY the main domain with server_name

こ雲淡風輕ζ 提交于 2021-02-10 16:55:46
问题 My goal is to redirect example.com into www.example.com without redirecting any subdomain to www . This is what I have: server { listen 443; server_name example.com; return 301 https://www.$server_name$request_uri; } With this configuration every subdomain (ex: foo.example.com ) gets redirected into www.example.com , not just the main one without subdomain ( example.com ), as I would like. I tried cleaning cache (and also doing it from other browsers) with same results. Edit: The proof that

Node.js multiple subdomains

China☆狼群 提交于 2021-02-10 12:06:58
问题 I am using node.js to build a multi-tenant application where different clients with their own subdomains will be accessing a single instance of my app. My questions is: Is there a way for the app to find out which subdomain a user is on? That way, I can route the user to the correct database schema (postgresql). Thanks in advance! Additional information: I am using the Express framework I'm not using multiple instances because I expect to have upwards of thousands of users and I don't want to

Node.js multiple subdomains

天涯浪子 提交于 2021-02-10 12:05:48
问题 I am using node.js to build a multi-tenant application where different clients with their own subdomains will be accessing a single instance of my app. My questions is: Is there a way for the app to find out which subdomain a user is on? That way, I can route the user to the correct database schema (postgresql). Thanks in advance! Additional information: I am using the Express framework I'm not using multiple instances because I expect to have upwards of thousands of users and I don't want to

mod-rewrite subdomain to path in primary domain

自作多情 提交于 2021-02-08 10:32:53
问题 I have content from a different server on a subdomain that I would like to use as a subdirectory. Everything from sub.domain.com should be accessible to domain.com/sub I would like sub folders to work as well ex: sub.domain.com/about should be domain.com/sub/about Here's my current .htaccess contents <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(sorry).* - [NC,L] RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> Any help appreciated. Thanks! 回答1: Enable

routing subdomain to subdirectory on nginx

[亡魂溺海] 提交于 2021-02-08 10:28:23
问题 Please help as explicitly as possible. I have set up a domain on a home server running nginx on Ubuntu 15, and I have the dns pointed to it. I can use the domain to access the site and if I append /subdirectory to it, I am able to launch the pages inside the subdirectories. What I am trying to do is get the subdomains to go directly to the correct root. Ie: mysite.com = /index.htm, subdomain.mysite.com = ./subdirectory where files are located. I have tried every suggestion including those