Internal II(S) website works on HTTP(S) but not HTTP - iis-7.5

I setup an internal website on IIS 7.5 that can only be accessible by other computers on the network. The public has no access to my web server. It works only when I access it through HTTPS, but not HTTP. Why?
Note: All firewall settings on the machine where the web server is running are shut off.
Below is my port bindings for both HTTPS and HTTP.
Type: HTTP
IP address: 192.168.1.1
Port: 301
Host name: "Blank"
Type: HTTPS
IP address: 192.168.1.1
Port: 302
Host name: "Blank"
IIS Certificate: IIS Express Development Certificate
Web browser error for HTTP:
This site can’t provide a secure connection 192.168.1.1 sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

Related

Website works remotely but not on the server itself when called by domain

I am using Windows Server 2019 and in IIS 10 I have created a website and I have bound it to both: "localhost" and "mydomain.com" on port 80.
mydomain.com works correctly from any client but on the server only when I call "localhost" it works otherwise I get the following error (when called by domain):
Configure your DNS in your local server to resolve the domain name as localhost
On clients, your request domain.com is resolved by its configured DNS.
It can be on public DNS (internet) or private ones (company, intranet).
From the server domain.com, do you have access to the same DNS than your clients use ?
If not, either configure additional DNS servers :
https://serverspace.io/support/help/configuring-a-dns-server-on-windows-server-2012-or-later/
or you could edit you Host file of mydomain.com (local DNS):
C:\Windows\System32\drivers\etc\hosts
It may look like that :
127.0.0.1 localhost
127.0.1.1 mydomain.com
# and existing settings

Minimalistic IIS site not accessible externally

Made a minimalistic Hello World site.
Could access the site from outside when using IIS Express.
Switched to IIS version 10.0.19041.444 on the same Windows 10 box.
Behind the router (from inside), I get Hello World from: http://localhost:33333
Can ping the IP from outside.
All ports are forwarded to the webserver (by using DMZ in the router).
The firewall is turned off.
Applications Pool: DefaultAppPool
Cannot find any new entries in the logs after trying to connect.
The port was added using: netsh http add urlacl url=http://*:33333/ user=everyone
Bindings: Type:HTTP, HostName: , Port:33333, IP:*
Did iisreset.
http://82.65.140.190:33333 : Chrome: ERR_CONNECTION_TIMED_OUT

IIS doesn't work on localhost, how to solve?

Looks like localhost is not working. For this example I will use 192.192.92.92 as my ip address!
Starting by the C:\Windows\System32\drivers\etc\host:
#
127.0.0.1 localhost
::1 localhost
IIS binding:
Type: http
IP address: All Unasigned (there is no 127.0.0.1 or localhost in the list)
Port: 80
hostName: -blank-
When I start the server and click browse in ISS it opens the browser with the following error:
The strange thing with this is that it works perfectly fine with a custom host name!
C:\Windows\System32\drivers\etc\host:
#
127.0.0.1 localhost
::1 localhost
192.192.92.92 myCustomHostName.com
IIS binding:
Type: http
IP address: 192.192.92.92
Port: 80
hostName: myCustomHostName.com
My main objective is to figure out how to find a way to run the IIS app on the localhost again. It used to work before, but I think uninstalling APACHEE - XAMPP confused everything in IIS and now there is no 127.0.0.1!
Stuff I have tried and didn't work for me:
Youtube:
Error || PhpMyAdmin || Login AllowNoPassword Error - Solved-
How to Restrict access to the phpMyAdmin by IP Address
https://www.youtube.com/watch?v=BX57ooAulsY
How To Change User Password In phpMyAdmin If You're Locked Out Of Your Site | WP Learning Lab
Error || PhpMyAdmin || Login AllowNoPassword Error - Solved-
access denied for user 'root'#'localhost' (using password yes or no)
SO:
Setting up 'localhost' equivalent bindings with IIS7
Getting error mysqli::real_connect(): (HY000/2002): No such file or directory when i try to access my project on live server
How to change the ip address of phpmyadmin MySQL?

CNAME is redirecting to my host page

I have a website hosted on the following path: mywebsite.com/test with the following DNS
mywebsite.com A 1.2.3.4 (host ip)
host.mywebsite.com A 1.2.3.4 (host ip)
On another domain I'm trying to make a subdomain CNAME redirect to this page using the following:
link.myotherdomain.com CNAME . mywebsite.com/test
However when I access link.myotherdomain.com it shows the host.mywebsite.com instead of mywebsite.com
I'm doing something wrong?
Thanks
CNAME record cannot include path. It only for domin to domain.
This setting will work.
link.myotherdomain.com. CNAME mywebsite.com.
If configured properly, all of mywebsite.com host.mywebsite.com link.myotherdomain.com are resolve to 1.2.3.4, then the following HTTP request is sent to IP address 1.2.3.4.
GET /test HTTP/1.1
Host: link.myotherdomain.com
......(omit)
Now, the most suspiicious element is the Virtual Host setting of webserver.
This is a function of the web server that behaves as if it is a different server according to the Host value in the request header.
To survey about Virtual Host, the following might be the most simple method.
curl -H 'Host:mywebsite.com' http://1.2.3.4/test // this will ok
curl -H 'Host:link.myotherdomain.com' http://1.2.3.4/test // this will not ok if Virtual Host enabled

Unable to access site remotely

we have IIS 7.5 on server machine.
All websites can be access locally (80 and 8081 port as well)
However, only port 80 website can be accessed remotely. But the website on 8081 cannot be accessed remotely.
What is wrong?
That is because you have firewall turned on for non standard ports (even if HTTP protocol is used and HTTP is enabled in firewall app/feature settings because it defaults to port 80).
To enable remote port 8018 access: under firewall.cpl -> Advanced settings -> Inbound rules add new rule for port 8081, TCP

Resources