how to use IIS and website hosting - sql

I am new website servers and hosting and just after some help clearing some stuff up.
Firstly if I use a website server on my computer ie. IIS is that the same as using a web host such as host puppa? and if so does that mean I don't need to use a web hosting company?
Secondly what hosting/ server do i need to use to run SQL and MySQL in my website?
Is there any good tutorials that run through all of this stuff for beginners as I am quite confused?

IIS is a web server such as apache or nginx. It's a Microsoft product and supports ASP.NET pages.
You can use it instead of a web host, but you have to make sure that your computer is reachable from the internet if you want global access. There is also some setting for what interface and port you want IIS to listen on, that should be set to your external IP address and port 80 for HTTP.
If you are behind a router with NAT, you have to use port forwarding to redirect port 80 requests to the router into your IIS.
As SQL server you can use Microsoft SQL Express or MySQL for example.
Personally, I use WAMP on Windows machines, which gives me everything I need: Apache, MySQL and PHP.
Furter reading: http://www.howtogeek.com/177129/beginner-geek-how-to-host-your-own-website-on-windows-wamp/ (wamp only, but I mentioned alternative applications above)
Edit 1: If your ISP gives you dynamic IP addresses (which is the common) you have to use some kind of dynamic DNS updating, you IP address might change.
Also, of course, if you shut your PC down, the site goes down as well.

Related

IIS sites can be viewed with http://localhost:port but not with local machine IP or loopback

I have googled this and found a lot of posts, but no definitive answer.
Basically, I want to play with making websites and set up a local virtual server with only IIS (v8.5) installed. It's not connected to the internet and it's purely for self education.
The problem is that I have sites working, different sites on different ports. All of these are viewable in a browser on the server if I use http://localhost:port-number as per the site's binding.
I can live with this - but I'm curious as to why, if I substitute the localhost with the server IP, or the loopback address the page can not be found. Clearly IIS is working as it serves pages with localhost.
I have added multiple bindings to a site so that 'all unassigned' the server ip and the loopback are bindings for the site on port 80.
As per some posts I've used CMD to add netsh add iplisten.
netstat - confirms the server ip is listening on all the ports of the websites created (3 sites, each with a different port number)
Firewall is disabled as it's only virtual server with no internet access.
I'm aware I can add a domain address and put this in the hosts file, but I'm really just curious as to why I can't browse the sites hosted in IIS locally by the server's IP or loopback.
Thanks in advance

Hosting Slim Framework Rest API in Windows

I created an api using SLIM framework, but the services are not accessible to public as they are limited to localhost. how to host the services on a realtime server, so that, they can be accessible from anywhere?
please some one help me
This question requires more detail in order to answer properly.
If you are hosting your API on a windows server, then it is likely you have configured some kind of "WAMP" stack, correct? Or maybe serving PHP through IIS? This are important questions because we need to know what port you have bound your web application server to, which leads us to the next question...
Where are you hosting the server which is running the application which bound to what port?
Ultimately, a public, external IP will need to be either:
a. NAT'ed to the internal IP of your web server instanced
b. Port-forwarded to the internal IP of the server running your web application
Still, we are making a lot of assumptions here because getting a web application "accessible from anywhere" will require different work depending on your environment.
Here is the most basic example:
You are at home, running this API on your Windows workstation and will like to be able to hit it from a remote location.
Ensure Windows firewall allows inbound traffic to the port on which your application is running (probably port 80/HTTP, maybe 443/HTTPS).
Log into your ISP's router and configure port-forwarding to ensure inbound traffic on, say, port 80, is routed to the internal IP of the workstation running the API.
That's all there is to it.
Keep in mind that this also assumes that your ISP even allows you to expose your own web server to the internet on port 80 (or 443). Also, since we know nothing about your environment, this is all pure conjecture. Please provide more information you would like a real answer.
The most traditional way to host Slim Framework, would be through Apache. Install Apache and be sure you have the proper network settings to allow inbound connections, but more information about your setup could be needed for proper guidance.
http://httpd.apache.org/docs/2.4/platform/windows.html
When Apache is installed and working, you need to set Rewrite rules on the URL, information on that can be found on http://docs.slimframework.com/routing/rewrite/.
Your question on the verge of off topic, it probaly is, but read up on what questions can be asked and not, here on Stackoverflow, hope i could help.

Apache/IIS relay

In my LAN I have two web servers, one Apache Linux Server (Debian) and one Microsoft Web Server (IIS7).
Apache has three webpages, i.e., apache01.com apache02.com and apache03.com and IIS7 has microsoft01.com and microsoft02.com
My question is:
To access from outside LAN to any domain, what is better? NAT port 80 to IIS7 or to Apache?
And then, How to delay from Apache/IIS7 to IIS7/Apache the domains it doesn't manage?
I've never done this, so I ask because it could be a lot of thinks I'm not seeing.
I don't need a full procedure, only a guidelines to continue researching.
Thanks
The solution, here
The key is IIS URL Rewrite Module and Reverse proxy

getting router confuguration page instead of my web home page of my website

I am trying to host a website from my local pc. For that i have installed apache server, registered a domain name and done the necessary settings.The problem is that when I am trying to access my homepage I am getting the router configuration page, same is happening when I am trying to access the website from other computer.Please help.
When hosting a website from a local PC behind a router you need to be careful to use the public IP that your service provider has given you. Beware this is often not a static address and may change frequently. To address this you can use some type of DynDNS service if your router supports it.
Second, you will need to add a rule in your router's firewall to allow the traffic from the public internet to reach the computer behind the router. This can be done either with a DMZ (less secure) or a port forwarding.
When you are trying to access the web page, type in the local ip of the computer you have setup the server on. This should take you to the apache server. You are likely just typing in the wrong IP. Try something like http://127.0.0.1/ (127.0.0.1 is the same as localhost) to make sure you get the apache server from the computer that is running the server.

how to make apache server public

I want to convert my pc to a web server. I installed centos server and apache server.
How I can make apache server public? I want to everyone access my web site on my pc via browser.
Thank you..
You have 2 ways, you can buy a domain and a static IP address for your computer (usually through the service provider) and configure your router and FW to allow access to the machine for port 80.
The other way is to use some sort of dynamic dns service like DynDNS to be able to bind a DNS to a dynamic IP address (you will need to run a daemon to update the account once in a while because your IP may change). The FW and router rules are still needed in this case as well.
After you do one of the these steps everyone should be able to access your apache server on your computer as long as it's on.