configure hostname for wordpress site using webmatrix - wordpress

How can I configure a wordpress site built using webmatrix on windows to run on a specific hostname instead of localhost with a port number.
For example my site is currently running on http://localhost:64044/
I need to be able to view it via http://www.mydomain.co.uk
I know I can edit my hosts file in windows to point my domain to my local pc like so:
127.0.0.1 www.mydomain.co.uk
but I cant see how or where to configure hostname bindings for the wordpress site in webmatrix?

probably you can't do it directly from WebMatrix. But you can do it manually by editing IIS Express configuration file %userprofile%\documents\iisexpress\config\applicationhost.config (WebMatrix uses IIS Express web server). Take a look at following posts
Binding IIS Express to an IP Address
Is it possible to use custom host headers / bindings with IIS7 Express?

Related

How to access an ASP.NET web api that runs on localhost (IIS)

I built an ASP.NET Web API. I run it locally from Visual Studio on IIS Express. I need to access this api from other device from another network, so I understand that it has to be hosted on the development machine on IIS, right? What I read is that:
I need to enable IIS Manager in the Control Panel (source) - DONE
Assign the IP of the dev machine to the localhost (source; source 2) - I don't see my site in the IIS Manager under Sites, only see Default Web Site. Why is that?
I assume the site needs to be hosted somehow on the dev machine, because I need to stop Visual Studio, therefore the IIS Express will be stopped and the site would not be accessible, even from localhost right?
My dev machine has a public static IP and I can access this Default Web Site successfully from outside.
You should consider your API in IIS just as any IIS App. i.e. a website.
It needs to have an IP (or a hostheader value)
Lets say api1.example.com binded in IIS with your IIS Application.
Your DNS must resolve this to the IIS machine IP.
then you can access it in that URL.
You can also just hit the machine IP running the IIS web server (on the port you added for the api - if its not :80)
See "Bindings" in IIS
See this Video : https://www.youtube.com/watch?v=I32AnqJzD58

Wildcard sub domains in IIS10

I want to access the application www.testsite.com using different wildcard Sub-domain such as :
abc.testsite.com
xyz.testsite.com
I have installed IIS Express 10 on windows 10 Machine and followed below steps:
Created an simple Asp.net MVC web application and published in local folder
Added an website in local IIS as www.testsite.com
Mapped the website to the published folder.
Added binding as *.testsite.com
Edited host file with 127.0.0.1 www.testsite.com and 127.0.0.1
*.testsite.com
Now I am able to access www.testsite.com but not using any other sub domains
Am I missing anything ?
You can add wildcard entry on IIS, but you have to specify the list of subdomains that you are going to map. Ultimately host file will not support any wildcard entry.

How to host Asp.net website with SQL Server database on server (personal Laptop)

I have website which was developed in ASP.NET, I want to host this website on a server which is my own laptop (for test purposes). Also the website has interaction with SQL Server. So then anybody can use this website when my laptop is turned on. Is it possible? If yes, please inform me of the correct way to host my website
You just have to install IIS on your PC and use it as a web server. Your site will be available by IP or domain name (how-to or Youtube how-to). Also you can use dynamic IP and domain name with Dynamic DNS service like dyn.com

IIS 7.5 URL rewrite based on domain name

I'm currently using IIS 7.5 to both host ASP pages and as a bridge to a tomcat server setup to host JasperReports. I've been trying to figure out how to host both of these services with 1 IP and one IIS server.
What it should do
1) When the account managers visit admin.mycompany.com, I'd like to display the ASP pages in IIS. under the domain admin.mycompany.com
2) When the account managers visits reports.mycompany.com, IIS should act as a bridge to the tomcat server and display the tomcat pages under reports.mycompany.com
Restrictions
1) Our hosting provider refuses to give us a 2nd IP, and
2) I'd prefer not to install Apache, which can easily do this with virtual host.
This question can be resolve with https://serverfault.com/questions/47537/can-iis-be-configure-to-forward-request-to-another-web-server
I copied vdboor's answer here for reference:
For IIS 7.5, Microsoft provides official modules for this!
URL Rewrite: http://www.iis.net/download/URLRewrite
Reverse proxy: http://www.iis.net/download/ApplicationRequestRouting
In the site settings, you'll get an "URL Rewrite" icon.
Open it
right click on the "inbound rules list"
Select "Add Rule(s)"
Choose "Reverse proxy"
In this dialog you can enter the hostname + port to forward to. After adding the rule, opening the edit dialog offers more customizations.
the reverse proxy template is not available at the server level.
- so you need to go to the site level, and then click the 'URL rewrite' icon to be able to use this template.
http://forums.iis.net/t/1183318.aspx

Friendly URLs for localhost ASP.NET websites

I Use Visual Studio 2010 with ASP.NET 4.0 and IIS7.
When I open my site, the URL looks like this
http://localhost:6549/Website/help/tab/contact-us
I want a friendly URL:
http://mysite/help/tab/contact-us
or anything that will help me to get rid of the Port 6549 from URL
http://localhost/Website/help/tab/contact-us
I use ASP.NET Development Server which is what Visual Studio use when you run a localhost website
Wait !! Please make distinction between "Properties window" and "Property pages" of the project. I always tried your advices, but using "Property pages", and there is no such property like Use dynamic ports on that page. This property can be found only in the "Properties window"
Assuming it's the ASP.NET development server:
To get rid of the port number you need to do this
- go to properties of the project
- click the web tab
- check the specific port and assign 80
There is also a virtual path setting here which you could set to /
Is your solution configured to use IIS and not the ASP.NET Development Server? There is also a property on the web application where you can specify the port (or allow for a random port to be chosen) - port 80 is the appropriate port - this requires administrator access to the process that is launching the web site.
Edit:
I was thinking you can use your host file to redirect the user, but I checked and you can't redirect to a port.
If you have IIS7 on the machine, just make the location of your web development folder into a virtual directory on IIS.
Then you can access it by http://localhost/website/

Resources