Multiple domain names pointing on same name server - web-hosting

I have 2 domain names. Can I point both domains to the same name server without having any adverse effect. Please let me know. Thanks.

You may use Addon domain or parked domain.Any adverse effect is nothing.

Related

My website is not refreshing CSS changes made

I have one specific domain that this issue is connected with. I have 10+ more domains from the same registrar. This one domain is on a on a different webhosting account that the rest of the domains (the same webhosting company though).
Whenever I make changes to CSS, the changes are not reflected until I change an IP address via VPN. And even then, it only refreshes once, then I need to change the IP again to see another change made. Sometimes not even that helps.
This happens on different internet networks.
The website runs on wordpress, but I have tested it with a separate set of files outside of WordPress.
Does anyone have a clue what it may be and how could it be resolved? Thank you!
I have tried broadband, mobile network but it's the same scenario for both. This makes me believe that it's not a router or device issue (local cache). It goes without saying that I have cleared cache and DNS multiple times.
One thing to mention is that all of my domains run through Cloudflare - yet only one is affected.
My webhosting company is not very helpful this time and only have checked whether my IP is blocked, which I think is a useless taken the above scenario.
All of my other 10+ domains reflect the changes immediately, even without clearing the cache.
Just in case anyone is experiencing something similar, it was due to Cloudflare. I have set the nameservers to point directly to the hosting provider and that fixed the issue.

Decide a different 'main' IP for a specific process

I have 3 IP set on my server (Windows Server 2008).
One particular application needs to be working on the 3rd IP, unfortunately the 'bind' paramater of that special application is half working, the application is using my main IP instead to communicate.
The application use "GetHostByName" and/or "GetAddrInfo" to get my main ip. I can know that because I reverse engineered it.
I would like to "spoof"(I think) another main IP for this application. I would like to keep my IP settings as is because everything else is working and I feel I shouldn't touch it.
So basically I would like "GetHostByName" and "GetAddrInfo" to return another IP of my choice, only to THIS particular application.
I am aware that this probably can't be done exactly as described. Maybe it can, but if not I would like to know what do you guys think the best solution would be to achieve my goal.
Thank you,
Yanick
Well I continued my research, changed my words, finally found this:
https://r1ch.net/projects/forcebindip
Note: the only thing not working was accessing stuff with 127.0.0.1 (MySQL for example), I had to use my main IP, not sure if my problem, my specific application's problem or a common problem.

Codeigniter's Session Library: How to get the correct IP Address when using Proxy

I have an application that uses Codeigniter 3x and Cloudflare for adding an extra security layer.
When I use $_SERVER['REMOTE_ADDR'] my application returns Cloudflare's IP and not my user's IP, so I always need to use $_SERVER['HTTP_CF_CONNECTING_IP'] instead.
So far, ok. When I need my user's IP in any controller I reach out to $_SERVER['HTTP_CF_CONNECTING_IP']. The problem is that my Session Library doesn't do that. And my ci_sessions table is filled with Cloudflare's IPs.
So my question may be a little broad, but I needed some ideas on how to fix that without messing with CI's core files? I've noticed that there's a file on system/libraries/session/drivers/Session_database_driver.php that is using the remote address. How can I extend it?
Cheers!
So, as #Narf commented, ci_sessions ip_address only matters if you use sess_match_ip (that's a setting in config.php). And, in his own words:
that's not sustainable outside of intranet environments, because public IP addresses can change often
So his recommendation is to leave ci_sessions table with Cloudfare's addresses. I thought it would be good to leave this here for future reference.
But if you really need to create custom drivers, #DFriend's recommendation works like a charm. You can find more information about this on CI's user guide, in this section.
And if you want to get your user's IP for another purpose, just use $_SERVER['HTTP_CF_CONNECTING_IP'] or even $this->server('HTTP_CF_CONNECTING_IP'). It works for me.
I really want to thank you guys for helping me figure this out.
Cheers!

Is there a way to find out what the local ip is of a website?

Like i said in the title. Is there a way to find out what the local ip is of a website. If there is not, is it possible to make one?
So it must start with 192......
Thanks
I'm not sure whether I got your question at all. But when you want to know the ip from an website, simply resolve the domain (for example using dig, nslookup, etc).
When you want to know the internal network-ip of a webserver that is located behind a nat, I think there's no simple solution possible - unless you have access to the machine.

1 A-record for every subdomain (10000+); any potential issues? Any other solution?

Most solutions I've read here for supporting subdomain-per-user at the DNS level are to point everything to one IP using *.domain.com.
It is an easy and simple solution, but what if I want to point first 1000 registered users to serverA, and next 1000 registered users to serverB? This is the preferred solution for us to keep our cost down in software and hardware for clustering.
alt text http://learn.iis.net/file.axd?i=1101
(diagram quoted from MS IIS site)
The most logical solution seems to have 1 x A-record per subdomain in Zone Datafiles. BIND doesn't seem to have any size limit on the Zone Datafiles, only restricted to memory available.
However, my team is worried about the latency of getting the new subdoamin up and ready, since creating a new subdomain consist of inserting a new A-record & restarting DNS server.
Is performance of restarting DNS server something we should worry about?
Thank you in advance.
UPDATE:
Seems like most of you suggest me to use a reverse proxy setup instead:
alt text http://learn.iis.net/file.axd?i=1102
(ARR is IIS7's reverse proxy solution)
However, here are the CONS I can see:
single point of failure
cannot strategically setup servers in different locations based on IP geolocation.
Use the wildcard DNS entry, then use load balancing to distribute the load between servers, regardless of what client they are.
While you're at it, skip the URL rewriting step and have your application determine which account it is based on the URL as entered (you can just as easily determine what X is in X.domain.com as in domain.com?user=X).
EDIT:
Based on your additional info, you may want to develop a "broker" that stores which clients are to access which servers. Make that public facing then draw from the resources associated with the client stored with the broker. Your front-end can be load balanced, then you can grab from the file/db servers based on who they are.
The front-end proxy with a wild-card DNS entry really is the way to go with this. It's how big sites like LiveJournal work.
Note that this is not just a TCP layer load-balancer - there are plenty of solutions that'll examine the host part of the URL to figure out which back-end server to forward the query too. You can easily do it with Apache running on a low-spec server with suitable configuration.
The proxy ensures that each user's session always goes to the right back-end server and most any session handling methods will just keep on working.
Also the proxy needn't be a single point of failure. It's perfectly possible and pretty easy to run two or more front-end proxies in a redundant configuration (to avoid failure) or even to have them share the load (to avoid stress).
I'd also second John Sheehan's suggestion that the application just look at the left-hand part of the URL to determine which user's content to display.
If using Apache for the back-end, see this post too for info about how to configure it.
If you use tinydns, you don't need to restart the nameserver if you modify its database and it should not be a bottleneck because it is generally very fast. I don't know whether it performs well with 10000+ entries though (it would surprise me if not).
http://cr.yp.to/djbdns.html

Resources