subdomain

bind ip to subdomain

纵然是瞬间 提交于 2019-12-11 15:38:44
问题 I have a linux client that reports his ip adress to a server who writes the ip down in a mysql table. Now my question is how to bind this ip adresse to a subdomain in the moment it is submitted by the client? i heard about the Linux DNS Bind but the addresses their are declared static in a file called "named.conf" if im getting it right... How would you solve it? Thanks in advance 回答1: DNS servers like bind allow for dynamic dns updates from DHCP servers and the like: https://www.isc.org

Modify Rack App

回眸只為那壹抹淺笑 提交于 2019-12-11 15:36:31
问题 For one of my ruby applications i need the server to route requests based on the subdomain. There are ways to do this using other gems but i decided to make my own "middleware". This code runs applications based on where the request is going to. config.ru require './subdomain' require './www' run Rack::Subdomain.new([ { :subdomain => "test", :application => Sinatra::Application } ]); subdomain.rb module Rack class Subdomain def initialize(app) @app = app end def call(env) @app.each do |app|

What is the correct value for SESSION_COOKIE_DOMAIN if my Django site is set up on a subdomain?

﹥>﹥吖頭↗ 提交于 2019-12-11 14:55:00
问题 I have constant problem with cookies on my Django site which is set up on a subdomain. It works for a couple of days, then message 'your browser doesn't accept cookies' appears on a login page. I need to restart my web server to make it work for a couple of next days and this cycle repeats. This is really frustrating. I am not sure what am I doing wrong. I suspect that SESSION_COOKIE_DOMAIN might be set to a wrong value. What is the proper way to set it? SESSION_COOKIE_DOMAIN = 'subdomain

Server Blocks in nginx - 502 Error

女生的网名这么多〃 提交于 2019-12-11 14:48:50
问题 I have 2 subdomains I want to catch and forward from one server running nginx: foo.acme.com, bar.acme.com In my nginx.conf file I have set up 2 server blocks: server { listen 80; server_name foo.acme.com; location / { proxy_pass http://<my_ip_server_1>:80; } } server { listen 80; server_name bar.acme.com; location / { proxy_pass http://<my_ip_server_2>:80; } } My 2 subdomains point to the same IP (the one with nginx running on it). I'm getting 502 Bad Gateway errors on both servers in this

Rails 3.1 load controller from different path based on subdomain

只谈情不闲聊 提交于 2019-12-11 14:24:42
问题 Is it possible to dynamically change the path from which controllers are used? Ryan Bates showed how to change the view_paths here: http://railscasts.com/episodes/269-template-inheritance I'm making a CMS where a user can create a site and enter their own subdomain. I'd like "/" to point to "public#welcome" if there's no subdomain, but if there is a subdomain, I want it to point to "sites/public#welcome". I'm using Rails 3.1 if that makes any difference. 回答1: You should be able to solve this

redirecting subdomain to subfolders with .htaccess

只谈情不闲聊 提交于 2019-12-11 13:27:34
问题 i am trying to redirect a subdomain to a subfolder i have 3 sub-domains pointing to a folder named "test" placed on the root (/test) subdomain1.mysite.com subdomain2.mysite.com subdomain3.mysite.com in test i have 3 folders `/test/subdomain1 , /test/subdomain2, /test/subdomain3` what i want is that: when i go to subdomain1.mysite.com it should be reading from: /test/subdomain1 when i go to subdomain2.mysite.com it should be reading from: /test/subdomain2 when i go to subdomain3.mysite.com it

creating subdomains with apache on debian; creating hgweb subdomain as second step

妖精的绣舞 提交于 2019-12-11 13:13:49
问题 After hours of trying to setup subdomains on my dedicated root server, I'm asking you for help. Target: being able to create and access subdomains setup an own subdomain for mercurial repositories, using hgweb Information about the server: Debian Linux, Kernel 2.6.32-028stab094.3 Apache/2.2.16 (Debian) Mercurial 1.6.4 libapache2-mod-wsgi-py3 installed First question: what is wrong with my apache configuration that I can't access my subdomains via the browser? Actually, I can access the root

Forms Authentication Sub domain cookie passing in some servers not others

牧云@^-^@ 提交于 2019-12-11 12:57:08
问题 I am trying to set up forms authentication across multiple servers and subdomains but I am finding an issue where it works on some of our boxes and not others. We are passing 2 cookies from one server to another. One the Forms Authentication encrypted cookie and the other an non encrypted cookie. We have the correct keys set on both boxes: <authentication mode="Forms" > <forms name=".MSLA" protection="All" timeout="30" slidingExpiration="true" path="/" enableCrossAppRedirects="true" /> <

How do I use Let’s Encrypt with GitLab under Plesk on Subdomain?

Deadly 提交于 2019-12-11 12:49:21
问题 I got GitLab up and running, but currently it doesn't use SSL. I use the Let's Encrypt Plesk Extension to get free SSL Certificates in general. This is what my setup looks like: Plesk v12.5.30_build1205150826.19 os_Ubuntu 14.04 GitLab 8.8.5 Let's Encrypt Plesk Extension v1.6 Release 1 Plesk Subdomain: git.my-domain.com Plesk Apache & nginx Settings for git.my-domain.com: Additional directives for HTTP : <Location /> ProxyPass http://IP-of-my-domain:9999/ ProxyPassReverse http://IP-of-my

Hosting multiple Node.JS applications recognizing subdomains with a proxy server

折月煮酒 提交于 2019-12-11 12:45:36
问题 I am trying to redirect certain subdomains to a specific port on my ubuntu AWS EC2 virtual server. Already tried it with DNS and that wouldn't work so based on the following topics, Default route using node-http-proxy? and How do I use node.js http-proxy for logging HTTP traffic in a computer?, I was trying to create a Node.JS proxy server with logging. That said I mixed it a bit up together (I'm new to Node.JS, still learning) and made the following script: var httpProxy = require('http