I am have a web application on local IIS (mylocalsite.com)
What settings I need, so that I can handle all subdomains of my local site, like
user1.mylocalsite.com
user2.mylocalsite.com
anything.mylocalsite.com
All urls will point to same index page from where I can seperate subdomain and load page accordingly.
Since your description is not that clear, my initial thought would that you can setup different Bindings in IIS to cater for all the subdomains.
In IIS 7, right click your website -> Edit Bindings -> Add..
But my guess would be that you may need to do this from code, since users are added to your system (assuming user/sub-domain model). For this I refer you to
Create Binding in in IIS (iis.net)
Cool new IIS7 Features and APIs - ScottGu
Microsoft.Web.Administration
Related
I'm using Visual Studio 2019 (as Administrator) and IIS Express with the extra Widows 10 features needed to publish web sites on the internet. I created a new Blazor app with the following choices:
Server Side
.NET 5.0 (because .net3.1 does not have ProtectedBrowserStorage)
Authentication - None
Configure for HTTPS (because my domain name uses Cloudflare servers)
Enable Docker - No
Environmental variables
Project properties - None
Windows AdvancedSystemSettings - Development
I did not add any more components nor did I modify the default code.
I built and ran it in release mode.
The web site displayed the home page on a Chrome browser.
I could navigate to the Counter page.
When I clicked the "Click Me" button the current count incremented as it should.
Then I published it to the default file ("~bin\release\net5.0\publish).
I copied this file (with admin privileges) into inetpub and renamed it "B02".
In IIS I created a new web site called B02 specifying the physical path as C:\inetpub\B02.
New App Pool B02 was created and I accepted it.
I did not add a specific user so Test Connection failed but I think this is OK.
I added two bindings
https port 443 IP Address *
https port 443 IP Address 19.168.0.34 (the reserved address of the computer on the router to which port 443 is forwarded. i.e. I'm using port forwarding on a NetGear router)
I could then click, in IIS, "Browse*:443(https) and the web site was OK. I could navigate to any page and all links worked including the "Click Me" button which incremented the counter.
The problem is that when I enter into the Chrome browser the address
"https://www.bkdaniels.com" the web site appears, I can navigate to any of the three pages, the About button works, the "Brief Survey" button works BUT THE "CLICK ME" BUTTON DOES NOT INCREMENT THE COUNT. (It does change the style of the border of the button).
I have presented this simple problem in the hopes that it will enable me to make user interactions work on a custom web app I have written. Presently they all work in IIS browse but not over the internet.
My domain name "bkdaniels.com" is registered with GoDaddy where I have specified to use name servers at Cloudflare because Cloudflare provides and SSL Certificate that prevents clients seeing a warning about the site being not secure.
7/29/22 A solution has been found.
A couple of trivial changes that cleaned up warnings in the Browser console were as follows:
Installed 6.0 SDK
Added to Program.cs - app.UseWebSockets()
These alone did not solve the problem. the Counter click me button still failed to increment the count.
The action that solved the problem was to go to GoDaddy and change the nameservers from Cloudflare servers to GoDaddy default name servers.
I then had to by pass the security warning since I no longer had the SSL certificate that Cloudflare provided. So I clicked "Run Anyway".
The "click me" button incremented the counter.
I will now work with Cloudflare support to find a way to make it work through their nameservers.
8/15/2022 I have now found that a temporary workaround is to set the Cloudflare Dashboard Cache to Developer Mode. This solves the problem with the counter button and also enables my main web site to work. I am still looking for a proper solution.
8/29/2022 SOLUTION
This solution enabled the click on the default Blazor Server app to work and it also enabled my serious web site to work perfectly.
Cloudflare/ logon/ domain name/ dashboard/ speed/ optimization/ auto minify/ HTML / OFF
.
I'm new to Umraco CMS i'm developed a site and hosted in local IIS, but i have One More site and i want to hosted in Umbraco How to Host Multiple sites in single Umbraco.
Generally you have one instance of Umbraco for each website. However, there are exceptions to this; for example multi-lingual websites or if your websites are so similar that they will share content, document types, templates etc. then you could set up multiple websites in the same instance... it is relatively simple...
First of all you need to setup/bind your URLs to the Umbraco website in IIS. Go to Bindings in IIS for your Umbraco website and add the other URL.
As a simple example, in Umbraco, a website has a Home node at root level. The children of that node are the pages on the site.
You can create another node at root level and create another site under that.
To set up a different URL for each root level node you just right-click each Home node and choose Culture and Hostnames. Add the URL and language of your site. Done!
The URLs that you set up in IIS all point to the same Umbraco instance and Umbraco looks after the routing.
That's how it's done but honestly, if you have two totally unrelated sites, then you should have a separate instance of Umbraco for each.
We have installed SSL in server for a Joomla website and https is working fine for Joomla admin panel. But in front end it auto redirecting to http.
i.e in browser if I enter https://mysite.com it auto redirect to http://mysite.com (without S).
I do not know how to fix this. Please help me.
Joomla version - 2.5.7
The following instructions are for Joomla 3, but for other versions the instructions should be identical, it will just look a bit different and the menus might be in a different place.
Log into your Joomla admin site.
Go to Global Configuration
Go to the Server tab.
Find the option "Force SSL" and change it to "Entire Site".
Click "Save and Close"
Clear your site cache.
If you have any SEF extensions with caches, they will need their caches purged too. They may also have their own HTTPS settings within their configuration, however that will vary by extension.
Here is a screenshot taken from Joomla 3:
It is also possible to activate SSL on a per-page basis. This is done via the menu manager.
You may also want to check your web server configuration (i.e. .htaccess) for any rewrites or redirects, but that's beyond the scope of Joomla configuration.
I would like to try testing virtual hosting of an ASP.Net MVC website on my local machine. In Visual Studio in the Web tab of the properties file for the MVC project, I selected Use Local IIS Web Server. By "virtual hosting", what I really mean is that I'm trying to make sure that pages load correctly for urls of the form http://sub-domain-i.my-domain.com/MyMvcProject/Controller/Action, where I'm hoping to test multiple subdomains in place of sub-domain-i. In production, everything will be running under a single IP address on one server. I also hope to test https for urls of this form using a wildcard ssl certificate, but currently I'm having trouble configuring Visual Studio to just test regular http. Prior to worrying about sub-domains, the Project Url field in the Web tab of the properties folder for my MVC project said "http://localhost/MyMvcProject", and everything worked fine. However, after changing this to "http://sub-domain-1.my-domain.com/MyMvcProject" and then adding the following line into my C:\Windows\System32\drivers\etc\hosts file,
127.0.0.1 sub-domain-1.my-domain.com
Visual Studio produces the error "Unable to create the virtual directory. http://sub-domain-1.my-domain.com/MyMvcProject". Does anyone know what I might be doing wrong?
Many thanks in advance!
Edit: I've just discovered that if I select Use Custom Web Server instead of Use Local IIS Web server, it works and I don't get the popup error from Visual Studio. I'm still not sure why this solution works, though, or what I was doing wrong by selecting Use Custom Web Server...
A little late, but I hope it helps somebody.
You need to create the binding in the IIS website prior to add it to the project url of the project. That binding must be like
http | sub-domain-1.my-domain.com | 80 | * or 127.0.0.1
How to create a binding
I have two sites running under one Sitecore 6 installation. The home nodes of the sites are as such:
/sitecore/content/Home
/sitecore/content/Careers
Assuming the primary site is at domain.com, the careers site can be accessed at careers.domain.com.
My problem is that, by prefixing the uri with /sitecore/content/, any sitecore item can be accessed by either (sub)domain. For example, I can get to:
http://domain.com/sitecore/content/careers.aspx (should be under careers.domain.com)
http://careers.domain.com/sitecore/content/home/destinations.aspx (should be under domain.com).
I know I can redirect these urls (using IIS7 Redirects or ISAPIRewrite) but is there any way to 'lock' Sitecore down to only serve items under the configured home node for that domain?
I can't say for sure without testing it but you could try putting each site it its own security domain and denying access to each other. In the <sites/> node there is a domain="extranet" attribute, create a new security domain and set the Careers site to use it.
You can create new security domains using the domain manager in the Sitecore desktop.