FAQ Database Discussion Community


Deploy django app with domain and subdomains using mod_wsgi

python,django,apache,subdomain,mod-wsgi
I am new to django and this is my first project in django. So far, I have developed a django app. It is working fluently in my local machine but I’m unable to deploy it online. I have seen many tutorials on internet for deploying the app on server. But...

wordpress subdomain (probably) using the htaccess of domain

wordpress,.htaccess,subdomain
so i have a wordpress in my domain and another in subdomain (folder inside domain) all is good now thanks to ravi here at stackoverflow. The only remaining problem is the pretty permalinks. I can't seem to use the post name but it's working when i used the default and...

How to deploy Laravel 5 on a subdomain

php,laravel,subdomain,laravel-5,vps
I have been using Laravel for quite a while but only recently have the need to deploy an app on a subdomain and I'm having some trouble. Everything works as it should if it's not deployed under a subdomain. So I have: domain.com (main site) and subdomain.domain.com (app) When I...

Node.js subdomain not working?

node.js,express,npm,subdomain
I am not sure what I am doing wrong, I am trying to do requests from a virtual subdomain using npm subdomain. I followed the directions https://github.com/edwardhotchkiss/subdomain var subdomain = require('subdomain'); var express = require('express'); var app = express(); var http = require('http'); var server = http.createServer(app); app.use(subdomain({ base :...

htaccess subdomain folder in wordpress

wordpress,.htaccess,mod-rewrite,subdomain
I need some help on the htaccess subdomain to be pointed to specific file in a folder for a wordpress site. Currently I have this in my .htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$ RewriteCond %{REQUEST_URI} !^/subdomain/ RewriteRule (.*) /subdomain/$1 RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ RewriteRule ^subdomain/(.*)$ http://subdomain.domain.com/$1 When the user enters subdomain.domain.com...

.htaccess redirect everything

.htaccess,subdomain
here is my situation... I have one domain www.ionzuniverse.com OR ionzuniverse.com I was looking for a way to redirect everything from that domain to a subdomain such as: iu.ionzuniverse.com To be specific I need everything that looks like this www.ionzuniverse.com/somepage OR ionzuniverse.com/somepage To redirect to something like this iu.ionzuniverse.com/somepage How...

display Subdomain address on URL bar

subdomain,hosting,cpanel
I create a sub domain and must add link to redirect. now, when someone click the new link - sub.domain.com the url on the top change to the redirection link like: www.domain.com/folder/folder/index.html. if i want that when someone click on the sub.domain.com the link in the top still be the...

Asp.net share forms authentication by two applications in the same domain

asp.net,authentication,cookies,subdomain,forms-authentication
I have two applications in the same domain: mydomain/app1 and mydomain/app2, and I need to share authentication between them. One app is in Asp.Net WebForms, and the second is using WebApi2. I configured web.config like below: App1: <authentication mode="Forms"> <forms loginUrl="/Login.aspx" defaultUrl="/Default.aspx" name=".ASPXFORMSAUTH" protection="All" cookieless="UseDeviceProfile" slidingExpiration="true" path="/" domain="mydomain" requireSSL="false" timeout="60"...

how to add event for drop-down component to change subdomain by selected item

ember.js,express,ember-data,subdomain,ember-cli
i use pod structure with ember cli. i have a 'drop-down' component. in my drop-down.js component: import Ember from 'ember'; var component = Ember.Component.extend({ tagName: '', //remove extra div wrapper. valueKey: 'id', textKey: 'text', options: [], value: null, defaultText: 'select...', selected: function () { var valueKey = this.get('valueKey'); var textKey...

What is the best practice to offer users to have his own sub-domain? Sub-Domain or Sub-folders? [closed]

website,subdomain
I am new in this kind of situation. I must implement a site in php that will have a URL like "mycompany.com". I would like to offer the possibility the users to create his own url inside my site. So user David could have 2 options: 1-Using sub-domains "david.mycompany.com" or...

Have Devise create a subdomain on registration

ruby-on-rails,ruby,devise,subdomain,subdomains
I would like to have Devise create subdomains on my site. Right now, I have two models: Company: A Company can register directly on the site, and after signing in, can invite their employees. When the company registers, I want a unique subdomain to be created (e.g. example.com => techcraz.example.com.)...

is there any limit for using server_name domains in nginx?

nginx,dns,subdomain,server,virtualhost
I want point multiple domains to a nginx instance. I use server_name for pointing them. server_name mydomain.com www.mydomain.com test.mydomain.com test1.mydomain.com; is the above given is best practice or there's any other safe/stable method for doing the same?...

Rails subdomains and default_scope

ruby-on-rails,scope,subdomain
I have a working app. I want to add subdomains that will serve the same app, but with different data. I added a subdomain field in one Foo table, and foreign keys pointing to this Foo table wherever I wanted data to be filtered by subdomain, for example the Bar...

What is the difference between a wildcart certificate and a chained certificate for a subdomain?

ssl,subdomain,ssl-certificate,x509certificate
Newbee SSL cert question. Background: I purchased a simple domain validation certificate from Comodo and got 4 certificates which I had to chain manually. The certificate costs 10USD. A wildcart certificate cost more like 100USD. Question: Is it not possible to create a certificate request for any subdomain myself and...

Create a subdomain alias that only has access to certain pages

angularjs,nginx,routing,subdomain
Background We're running a project for someone that wants a "white-label" solution (they want to have a subdomain of their site that shows certain pages of our site, styled to look like theirs). The main reason we're leaning towards this route is so their users feel like they haven't left...

Get domain with its subdomain from url

php,regex,subdomain
I'm using this function to get domain and subdomain from a string. But If string is already my expected format, it returns null function getDomainFromUrl($url) { $host = parse_url($url, PHP_URL_HOST); return preg_replace('/^www\./', '', $host); } $url = "http://abc.example.com/" -> abc.example.com | OK $url = "http://www.example.com/" -> example.com | OK $url...

Apache Virtual Server accept request from every domain

apache,subdomain,server,virtualhost
I am developing a website builder and I need Apache to accept request from every domain, like example2.com , example3.com , etc. <VirtualHost *:80> DocumentRoot /var/www/app1 ServerName builder.example.com ServerAlias *.example.com </VirtualHost> Is it possible? I know that I can create a vhost.conf file for each domain and enable it with...

Forward non-www to www except for specific subdomain

.htaccess,mod-rewrite,subdomain
I am routing all non-www requests to the www-domain by using this RewriteCond and RewriteRule: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.mydomain.tld/$1 [R=301,L] But there is one certain subdomain that I want to exclude, e.g. blog.mydomain.tld. How do I have to modify my condition and rule in order to...

How do subdomains work?

c#,asp.net-mvc-4,iis,subdomain,multi-tenant
I have a set up an ASP.net MVC application in my IIS at port 80. The website resolves for any subdomain. Like dev.localhost,test.localhost etc. No I have not set up any of these sub domain on my machine. I have no host file entries except the default, and no host...

How to change php configuration directory of php.ini file on a subdomain

php,.htaccess,subdomain,cpanel
I have a FTP access to subdomain.website.com and not to the cPanel of website.com I want to change some settings on php.ini file, but I am unable to find one. And the php info says Configuration File (php.ini) Path /usr/local/lib Loaded Configuration File /usr/local/lib/php.ini ...

Recognizing domains/subdomains with Codeigniter?

php,codeigniter,session,dns,subdomain
I am creating a site for 2 companies to share. In development, the URL structures for both sites are: 1) xx.domain.dev 2) yy.domain.dev Live, they will be: 1) site.xx.com 2) site.yy.com Once a user logs into the site, sessions are set for either site depending on the user's company email...

redirect WP post from one subdomain to WP page on domain subdirectory using htaccess- file

wordpress,.htaccess,rewrite,subdomain,subdirectory
I got a issue with my htaccess-file. I learned a thing or two when it comes on rewriting through the htaccess-file, but this one is really keeping me awake. Hopefully one of you can help me solve with this matter. The situation is the following. I want to redirect some...

htaccess force https & www. on domain & http no www on subdomain

apache,.htaccess,mod-rewrite,subdomain,no-www
How do I get in htaccess to force https & www. on domain, & http no www on subdomain? The following redirects the http://sub.domain.com to https://domain.com # for main domains RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R,L] # for sub domain RewriteCond %{HTTP_HOST} ^(www\.)?sub\.domain\.com$ [NC]...

Show content depending on domain using jQuery javascript

javascript,jquery,cross-domain,subdomain,business-catalyst
HI Guys I have a site that carries 2 domains one is .com and the other is a .us I am trying to get it to show a flag for the country domain chosen so if it is clicked on a link to direct to a .us I wanted to...

Google s2 favicon retrieval doesn't work with subdomains

url,google-api,subdomain,favicon
I'm using Google's favicon retrieval url which works well unless using subdomains. This works: https://www.google.com/s2/favicons?domain=facebook.com This doesn't https://www.google.com/s2/favicons?domain=fortawesome.github.io Thoughts?...

wordpress subdomain errors (2 wordpress)

wordpress,.htaccess,mod-rewrite,rewrite,subdomain
So I have an existing wordpress in Domain and installed a completely new wordpress inside a new folder (subdomain) inside the domain folder (domain/subdomain/). Now I want to access this new wordpress using subdomain.domain.com. Was able to do that but then having a problem with images. Was able to fix...

What do I need in my web.config to make wordpress work?

wordpress,subdomain
I have a custom website developed in C# ASP.NET. I installed Wordpress in a separate folder as a sub domain. I keep getting 404 page can not be displayed. What do I need to put in my web.config file to allow this site to come up?

Multiple subdomains to same address

apache,subdomain,vhosts
I want to redirect multiple subdomain to same address. Let's say I want www.sitename.com and sitename.com to redirect same address. Do I have to say; <VirtualHost www.sitename.com:81> . . . </VirtualHost> <VirtualHost sitename.com:81> . . . </VirtualHost> or is there a simple solution....

Map multiple domains to subfolders in EC2

amazon-web-services,amazon-ec2,dns,subdomain
I have an ec2 instance running a LAMP stack. I plan on hosting some client mockups, static sites, etc. what i want to achieve is havethe sites in /var/www/sites/site1, /var/www/sites/site2 and so on. then mapping a url to each so it will end up like example.com mapping to /var/www/sites/site1. How...

How to upload wordpress theme to sub domain

wordpress,xampp,localhost,wordpress-theming,subdomain
In my localhost(xampp) wordpress themes are installed. I activate one of them And create user name and password for the wp-admin. And I backup database and wordpress site and upload it to subdomain(live site). After upload all content will load without CSS style-sheet. And wp-admin also not working. And url...

.htaccess exception for subdomain not working

php,.htaccess,exception,redirect,subdomain
I want to redirect the root of my website to a subfolder using .htaccess Should be: mysite.com -> Redirects to mysite.com/2015 mysite.com/something -> No Redirect sub.mysite.com -> No Redirect What currently happens is that sub.mysite.com is being redirected as well to mysite.com/2015. This is my current .htaccess. Already tried a...

Postfix rewrites my return-path

email,subdomain,postfix-mta,return-path
I have been changing my mailing addresses from "example.com" to sub domains - say "mail.example.com" to configure no-reply addresses there. I use "sendmail -f [email protected]" to send emails making sur ethe Return-Path is correct. My mail delivery chain looks as follows: SENDING SERVER --> relay_server --> gateway out For unknown...

Cloudflare Conflicting Page-Rules?

caching,subdomain,rules,cloudflare
I have a website, say example.com. Couldflare is set to cache everything on *example.com/* If I add another rule: *nope.example.com/* And set it to bypass cache, what will cloudflare do with the conflicting page rules?...

How to create URL like http://api.example.com

url,web,dns,subdomain,cpanel
I have bought domain at cpanel I need to create the API path like http://api.example.com to create API for my database. where I should create folder called API in cpanel?

Subdomain pointed to VPS, where do I put files? [closed]

apache,dns,subdomain,godaddy,vps
I have now for the first time in 3 years setup a VPS at it seems that I have forgoten a few things. And I dont know if I have don wrong in the VPS setup or in the setup for DNS Records. This is what I have done: I...

Laravel Redirect to subdomain before loggin

redirect,laravel,subdomain
I want to create script that's going to be using different sub-domains as user accounts. The problem i have is, i would like to create script that's going to be redirecting user just before calling log-in attempt, so the session will be saved on sub-domain, not the main domain. However,...

How to change sign up confirmation link in devise?

ruby-on-rails,ruby-on-rails-3,devise,subdomain
I want to change sign up confirmation link in devise. At the sign up time actually I got this type of link "http://localhost:3000/companies/confirmation?confirmation_token=KjN-vnApU1GBYfso2LTA" but instead of this i want the link some what like this "http://subdomain.lvh.me:3000/companies/confirmation?confirmation_token=KjN-vnApU1GBYfso2LTA" in short I want to pass subdomain with link. so how can i do...

How to remove subdomain from root path in Rails

ruby-on-rails,subdomain,subdomains
I want to remove the subdomain from root path. I tried adding :subdomain => false to the root command in routes.rb file without success: when I enter manually a subdomain in the URL, the subdomain stays and will not be removed. Example: my root is => lvh.me:3000 enter subdomain manually...

Check Subdomain using whois

php,mysql,subdomain,whois
I'm trying to add subdomain to the list of my whois file. So my website visitors can check availability of the subdomains they want. Is there anyway to do that?...

Wildcard subdomain for some but not all values on DNSimple

dns,subdomain,wildcard-subdomain,vanity-url,dnsimple
I have an app that is roughly fractured between a server serving front end and one serving an API. We'd like to add a wildcard to catch usernames on the subdomain and direct those to the front end server. So my URLs map like so: Server that serves front-end files...

Adding Subdomain for my ruby on rails server, how to do?

ruby-on-rails,networking,debian,subdomain,host
i've got some problems with my ruby on rails server. It is running under localhost:3333 in my debian vm under a windows8 host. I've installed apache2 and passengermodul for apache to get ruby. And then I've installed rails. Now I need a subdomain wich calls the ruby on rails server....

RSpec tests fails with subdomain path

ruby-on-rails-4,rspec,subdomain
I can't provide path for RSpec with subdomain. The testing path should be api.example.com/public/v1/regions/origin?title=indm But I don't know how to provide such path for RSpec. How to path subdomain api to this relative path? let(:api_path) { 'public/v1/regions/origin?title=indm' } log 1) Regions Public API GET /v1/regions/origin?title=? returns 200 status code Failure/Error:...

Why does my subdomain only work in Chrome?

php,.htaccess,google-chrome,browser,subdomain
I've added a Virtual Host to my httpd-vhosts.conf file like this <VirtualHost *:80> DocumentRoot "/website/sub" ServerName sub.localhost </VirtualHost> I also have two .htaccess files (for the moment identical), one for localhost and one for sub.localhost website/.htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] website/sub/.htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME}...

Exclude sub domain rewrite non www to www in htacces

.htaccess,magento,subdomain
I'm having a Magento multistore setup and i'm sending all non www requests to www in the .htacces with the rewrite: RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] I'm using a sub domain for testing new websites and for this sub domain I don't need this rewrite. Therefore I use:...

can't run a django project with apache on a subdomain

django,apache,dns,subdomain
I have an online shop which contains a main page and a shop page. now this main page and shop page are actually two different projects, so in order to have them online, I have to run two instances of django. now the things is, i want to have the...

Redirecting one domain to another domains sub directory

dns,subdomain,url-redirection
I have been looking around on google and have had no luck. What am I trying to accomplish: I am trying to take my "domain1.com" and redirect it to "domain2.com/foo.php" is this possible?...

Flask sub.domain.com overrides session on domain.com

session,nginx,flask,subdomain,uwsgi
I have two seperate server one for domain.com and another for sub.domain.com, and I store sessions using flask-session and following configuration: SERVER_NAME = 'domain.com' SESSION_COOKIE_DOMAIN = ".domain.com" # Flask-Session SESSION_TYPE = 'redis' SESSION_REDIS = Redis(host='192.168.10.10', port=6379, db=0) further more I am using reverse proxy using nginx and: proxy_set_header Host $host;...

URL issue with subdomains

php,.htaccess,url,subdomain,subdomains
I'm currently developing a website with several domains and only 1 domain is giving a weird bug.. for example; website/maindomain (if maindomain / link is same as parent it doesnt show == website/) website/subdomain1/subpage1/subpage2 website/subdomain2/subpage3/subpage2 website/subdomain3/subpage3/subpage2 (this list goes on for some while) when i go from; website/subdomain1/ to the...

How to redirect example.mydomain.com to folder.mydomain.com via DNS/.htaccess?

.htaccess,dns,subdomain,hosting
Is it somehow possible to redirect example.mydomain.com, a subdomain which does not actually exist, to folder.mydomain.com using either .htaccess or DNS? How can this be achieved? When I access DNS from the control panel and click on the Web DNS tab, I see Personal web DNS settings, under which I...

.htaccess code to affect main domain only

.htaccess,mod-rewrite,subdomain
I have two domains. 1) main 2) subdomain. This code in the .htaccess file is causing me problems. # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). # RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond %{REQUEST_URI}...