subdomain

Rails 3.x TLD length

穿精又带淫゛_ 提交于 2019-12-04 00:53:50
问题 Is there some where in Rails's configuration where I can globally set the TLD length to 2 (co.uk as an example) so request.domain and request.subdomain parse correctly without having to pass options? That is, request.domain(2), by default Rails seems to be set to 1 by default and it makes sense to be able to change this globally, however, haven't been able to find anything in the documentation. Does such a configuration option exist? 回答1: For Rails 3.0.9 and below, there's no such

How to add SSL to subdomain that points to a different server?

六月ゝ 毕业季﹏ 提交于 2019-12-03 23:30:12
I don't know much about secure certificates, so please bear with me... I've got a webserver that has a single domain SSL certificate https://secure.mysite.com I also have a couple of subdomains that point to different servers. http://www.mysite.com ( main server) http://subdomain.mysite.com (completely different server) I am wondering: What is the best way to add SSL to the subdomain: https://subdomain.mysite.com Is it possible to configure something like this with a wildcard certificate? Or is it better to purchase another single-domain certificate and install it on the seperate server? Are

Creating subdomains dynamically for an application

回眸只為那壹抹淺笑 提交于 2019-12-03 23:06:23
I want to create subdomains dynamically through a PHP script or something similar. I've seen lots of sites that create subdomains for individual users, or for new forum spaces. I'm just wondering how that works, and how I can implement it in my system. Thanks for your help! Take a look into wildcard subdomains . Once you have all of the "subdomains" going to the right place, you can use url rewriting and/or some other mixture of redirecting to create the effect of subdomains without having to constantly update a httpd.conf setup and/or DNS tables. If you are using Apache on a Linux box, you

Django to use different settings.py file based on subdomains

£可爱£侵袭症+ 提交于 2019-12-03 22:09:14
How can Django use different settings.py file based on subdomains. Can these utilities ("django-admin", "python manage.py") still be used if there were different settings connecting to different databases. ok you have two dimensions you need to cover with your settings: Domain (site) Current Machine Here is what I recommend: universal_settings.py - all the settings you want to inherit everywhere (all machines, all domains) local_settings.py - settings on a per machine basis (database settings, mail server, etc) site_1.py - settings that are specific to a one of your domains site_2.py -

What options are there for sharing data across subdomains?

别来无恙 提交于 2019-12-03 21:08:53
I have www.example.com and also store.example.com . (Yes they are subdomains of the same parent domain) store.example.com is on ASP.NET 1.1 www.example.com is on ASP.NET 3.5 I want to know what options are available for sharing 'session' data between the two sites. I need some kind of shared login and also the abiltity to track user activity no matter which site they started on. Obvously I could send a GUID when transitioning from one site to the other. I also believe I can set a cookie which can be shared across subdomains. I've never tried this but it is most likely what I will do. I'm not

nginx - rewrite domain.com:port to sub.domain.com

僤鯓⒐⒋嵵緔 提交于 2019-12-03 20:48:00
How can i rewrite a domain with a port to a subdomain? e.q.: domain.com:3000 to sub.domain.com ? thanks for your help! :) greetz If you actually want to redirect (301 or 302) your web traffic You create a server {} section listening on port 3000 and you just redirect it to another server {} section that is listening on port 80. In each server {} section set the listen property appropriately. I guess you are trying to handle the redirection within à single server section and according to this page the listen directive applies to a server context If you want to use nginx as a proxy Then what you

How do I limit PHP apps to their own directories and their own php.ini?

核能气质少年 提交于 2019-12-03 19:38:53
问题 I am running multiple PHP apps on my Mac, running OS X 10.5.6, Apache 2, PHP 5. I have subdomains setup for each project, a host file entries for each subdomain, and Virtual Directory blocks in the Apache config. So project1.localhost goes to /Library/WebServer/Documents/Project1 project2.localhost goes to /Library/WebServer/Documents/Project2 etc... However, this method doesn't really "isolate" the web apps. For example, if I include a script like so: <?php include("/includes/include.php");

Setting up a subdomain with Apache on Linux

守給你的承諾、 提交于 2019-12-03 18:48:45
问题 I can't believe that I haven't done this before, but I would like a definitive answer so I'm all set going forward. I have an apache config file at /etc/apache2/sites-available/mysite which looks like this: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/sam/public_html <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /home/sam/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all <

Extract domain from url (including the hard ones) [duplicate]

亡梦爱人 提交于 2019-12-03 18:05:41
问题 This question already has answers here : How do you strip out the domain name from a URL in php? (7 answers) Closed 6 years ago . I'm trying to write (or just find an existing) PHP method that can take a link and extract the url. The trick is, it needs to hold under the weight of strange looking domains like: www.champa.kku.ac.th Looking at this one myself with human eyes, I still guessed it incorrectly: thought the domain would be kku.ac.th but that gives a dns error when visiting. So anyone

htaccess subdomain redirct with last url parameter

我怕爱的太早我们不能终老 提交于 2019-12-03 18:00:17
问题 I want to write a .htaccess file for redirecting my subdomains and URL's last variable to a new location. Here is what I want to do: http(s)://abc.example.com/books I want my internal URL to be like: http://example.com/?name=abc&type=books I have already gotten the subdomain redirect to work but I am not able to do subdomain with variable in last part of URL. How can I accomplish this? 回答1: This should do what you want: RewriteCond %{HTTP_HOST} ^(.+).example.com RewriteRule ^(.*)% http:/