How to catch all subdomains in plesk which installed in windows server 2012 ?
I founded answer for Linux servers but not same config file and other settings in windows.
I want catch all subdomains like *.domain.com in one file like domain.com/t.asp which can detect entered subdomain in this file, and address in browser not change to this file address and show same *.domain .
Only IIS 10 in Windows 2016 supports wildcard subdomains and you can create such subdomain in Plesk 17.
In Windows 2012 it's just not supported in IIS.
https://www.iis.net/learn/get-started/whats-new-in-iis-10/wildcard-host-header-support
You can also create a new subdomain and name it as (*.domain.com) with the root folder pointing to your default domain folder (httpdocs, in my case).
Remember also set your SSL certificate in your Hosting settings link, if any.
You should now be able to try URLs such as: one.domain.com, two.domain.com, etc...
insert an "A" DNS entry on your primary nameserver of your domain.
*.domain.com A XXX.XXX.XXX.XXX
Related
I currently have the following website setup on Windows Server 2012 R2. The following website is catching all the traffic to the webserver and then adding a few URL rewrite rules, such as forcing HTTPS and appending www.
I want to add a second website under a subdomain of the above site and diferent source code. How do I go about it?
EDIT: I've created a second website with a binding to the subdomain but all traffic is being redirected to the first website, as setup above. Does the first website require a defined Host Name? If so, that's not possible because the code of the website above is handling about 100 domains. The content is loaded based on domain name. So probably adding a subdomain of one of the websites is not possible. Is someone able to clarify, please?
Just create a new website in IIS for example hostname site1.yourdomain.com and set the bindings and and point to website folder.
create a 2e website with hostname site2.yourdomain.com set bindings, and point to your 2e website folder.
and you can have a main site with hostname www.yourdomain.com or yourdomain.com
also set an ip if you want to bind to a specific ip only.
it is important to set the hostname.
Just trying to create an web application, clients can create their own instance of the app, so I created a wildcard subdomain in CPanel, checked VirtualHosts and the A record in the DNS, all fine.
Now when I go to "client1app.domain.tld" it works, takes me to the clients app, but when that client creates a cname "app.clientdomain.tld" to "client1app.domain.tld", I get redirected to cPanels "Default Web Site Page".
I double-checked everything.
App DNS:
*.domain.tld. 3600 IN A x.x.x.x
Customer DNS
app.clientdomain.tld. 3600 IN CNAME client1app.domain.tld
App VirtualHost:
ServerName _wildcard_.domain.tld
ServerAlias *.domain.tld
Any help is greatly appreciated.
Note: I do have root, this is a VPS.
Simple things first, have you added *.domain.tld as a subdomain in cPanel using the user interface and not the command line?
I have tried to replicate this problem using one of my WHM servers and could not.
I recommend first updating cPanel/WHM to the latest version as some support articles covering wildcard subdomains point to some old versions of cPanel have bugs with wildcard subs which are now fixed.
I would also rebuild the httpd.conf if you have at any point manually edited it. Also make sure that the subdomain is not the same as the hostname as this causes some internal binding errors.
I set my environment up using only the cPanel sudomain button and not using the DNS editors in WHM or cPanel
i have website built in drupal. http://www.bhubaneswarlive.com hosted on linode.
Now somedays back i discovered that a Chinese website http://today.yangchenyun.com is serving my website too.
so i want to know whether he has copied my entire website files and database or he is just serving files and data by pointing to my linode's ip address (as said by linode support guy).
i.e Is it possible that someone can serve my website files by pointing to my ip address under his domain name?
When i update my website with new content both the domains show the new content.
Also one thing i have noticed that when i visit "restaurants link" on the right sidebar, which are just drupal taxonomy terms, perfectly shows list of data under its own url instead of redirecting to my website.I am asking this to know whether its related to drupal or my whole system has been copied.
can anyone suggest how to counter/solve this problem?
my server stack is
Linux- Debian
Nginx
Mariadb
php5-fpm
Drupal-7
fail2ban server
and some other softwares
on a Linode VPS
Both DNS use the same IP record. So yes, they simply recorded another domain name.
You have a very simple setting that you can use in Drupal, which is calle the base_url, this settings should alays be set in production servers.
Add this to you settings.php file:
$conf['base_url']="www.bhubaneswarlive.com"
You can also set it on the Drupal back Office interfaces, somewhere, but the right place is the settings file. If you have a multisite installation you can set that in the related settings files.
With this setting all pages links will contain reference to your website.
Then you can play with your Apache configuration and set a special named base virtualhost
<VirtualHost *:80>
ServerName today.yangchenyun.com
DocumentRoot /var/www/fush
</VirtualHost>
And then set any content you think appropriate for this domain name in /var/www/fush.
I am in the process of migrating an existing webserver running IIS 6 to IIS 7. I have setup the new websites on the new server but cant seem to test them as once I have entered the domain name when I selec t "browse" from within IIS 7 I get the site on my original server. How can I test the configuration of my new sites on my new server before migrating the domain names (eg updating the DNS records etc.)?
Any help much appreciated.
On the server, edit the hosts file to force the server into thinking the website is located on its self, instead of the IIS6 server.
The hosts file is located at C:\WINDOWS\system32\drivers\etc\hosts.
Just add a line in like:
192.168.0.1 www.mywebsite.com
where 192.168.0.1 is the IP address of the IIS7 server, and www.mywebsite.com is the website address to test.
Then restart Internet Explorer and enter www.mywebsite.com (or browse from within iisadmin) again, and it should give you the IIS7 site.
You could also do this on your PC and leave the server alone.
Don't forget to remove the line from your hosts file when you're done!
I'm trying to map help.domain1.com to help.domain2.com. I've seen this on UserVoice. They let you map something.yourdomain.com to something.uservoice.com.
On domain1.com I've set up a CNAME to help.domain2.com.
It works fine but when I open help.domain1.com I get the content of domain2.com instead of help.domain2.com.
After some experimenting I've realized that this is an expected behavior.
So my question is what do I have to do on domain2.com (or maybe on domain1.com?) to have it show content of subdomain "help.domain2.com" when I navigate help.domain1.com?
(I'm using Plesk and the OS is Windows Server 2003)
I was facing the same problem for the last couple of days, and just found the solution...
In /etc/apache2/site-available/default, I had two virtual hosts, first one was for my domain, and the second one was for my sub domain. All I had to do was reverse the order of the virtual host blocks, placing the sub domain in front of the domain, and it worked! :D
I found the solution. One way would be to use a mod_rewrite rule on domain2.com and do a redirect if referrer is domain1.com. Or to assign a dedicated IP address.
HTTP/1.1 uses the Host: header to figure out which site is being requested, should there be more than one site hosted on the same IP address.
You need to ensure that the second (target) web-server is configured to expect incoming HTTP requests with the original URI in them.
I am not 100% sure how to do this in windows but in apache you just need to setup a virtual host to redirect it from the main domain to your subdomain.
you do not say if you are using IIS or apache or what the webserver is.
I imagine that what you need to do is setup a new website in IIS (not a virtual directory) and in the website tab click on advanced and edit the entry in there so that the "host header name" is the subdomain you want.
Jon Hawkins