CouchDB port 80 - http

Is it possible to run couchdb on port 80? I'm looking to host a couchapp from it and don't want my users to have to type a port number in the url.
When I change the port to 80 in the couchdb config it becomes unavailable, and I have no access to it on 80 or any other port. I have to change the port back in the local.ini file.
Is this not a recommended setup? Would I be better hosting behind a reverse proxy? If so, any tips on how to get it working behind an IIS reverse proxy? I tried that too using ARR and URL Rewrite, with no success.
EDIT:
First, this chapter of the CouchDB definitive guide seems to suggest it is ok to server web apps directly from couch. Curious what the community thinks:
http://guide.couchdb.org/editions/1/en/standalone.html
Second, I installed CouchDB on a second machine that does NOT have IIS installed on it and it ran on port 80 just fine, so I suspect that even though I've turned off all websites in IIS it is still hogging port 80. Any way to make IIS give up port 80?

Ok I figured it out. By default IIS listens for port 80 on ALL IPs. So it also grabs 127.0.0.1 and listens on port 80 there as well, EVEN IF YOU TURN OF ALL WEBSITES listening on 80.
To remedy this you need to add an IP address to the IP listen list. By default this list is empty and IIS decides to just listen to all IPs. But if you add an IP or IPs to this list IIS will only listen to those IPs.
First here's how you can see what IPs are in the listen list:
netsh http show iplisten
If the list is blank IIS is listening on all IPs. To add an IP to the list:
netsh http add iplisten XXX.XXX.X.XXX (where the X's are your IP)
Now IIS and CouchDB can exist together on port 80 in happiness, as long as they both have their own IP's to listen to.

Related

IIS - Website at port 8080 can be accessed using localhost but not with external IP address

I have 3 websites running on my server, all of them on different ports. One is on port 80 and it works fine, the other one is on port 88 and it also works fine. Today I deployed a third one on port 8080, opened the port in Firewall.
I can access it with http://localhost:8080/, with 127.0.0.1:8080 and with it's internal IP address. I can't access it using the external IP address for some reason. I tried accessing it locally using the external IP address and I tried from another computer.
It is worth noting that the website on port 8080 is almost identical to the one on port 80.
Initially I thought it was a firewall issue but I disabled the firewall and tried again and I get the same result (The website took too long to respond).
I am using Windows 10 on the server.
Any ideas as to why this is happening?
I figured out the answer. I am using an EC2 instance from Amazon Web Services for a server. I forgot to go into the console in AWS and open the port there too. I did that and now it's working as it should.
There could be couple of reasons.
Cloud Provider(AWS) Specific
Check your subnet's ACL rules. Both ingress and egress
Check the security group attached to the instance. It should allow ingress
on that port/protocol
Windows Server Firewall: All windows servers and desktops have firewall running which blocks any non-standard traffic. Make sure to add a custom rule to allow the traffic that you want to allow. I found this https://computingforgeeks.com/how-to-open-a-port-in-windows-server-firewall/ link helpful

Nginx and iptables overlapping

I'm a little confused with nginx and iptables, I want to redirect all traffic to port 443 or port 8443 on my server, I also have mongodb running on port 27017, by blocking it, will I be able to access the database from my node.js app (which is running on port 8443)? should I use nginx to redirect or iptables? it seems that sometimes they overlap each other. So, which one is better to handle this?

Cannot host website on my personal server

I am not able to host my website on my personal server. I am using IIS7. I have already forwarded the port number 80 on my router and configured my firewall to allow incoming connections on port 80. The strange thing is that I am able to access SQL Server databse from outside which is running on port number 1433 but not my website. Please help.
I finally solved my problem.....i was having an issue with port forwarding thing...Earlier i opened up port number 1433 first then port 80 second the port 27015 third...in this order...now i channged the order ie 80 first then 1433 then 27015....strange but it worked...!!

Can network admin change the default port for http

I gave an answer to following thread. but in the comment a user suggested that network admin can change the default port of http from 80 to something else.
As for as I know if I open a page eg. http://www.example.com without port that means it is running on port 80.
I just want to clarify that is it possible for network admin to change default port?
When using a browser, http://www.example.com will always try and connect to the server's TCP port 80, like it's port 443 for HTTPS connections. These port numbers (defined here) are hard coded in any browser.
Yet a web server can be configured to listen to any other port, which rarely makes sense though. If it does, the browser will be unable to connect (unless the port no. is explicitly given as in http://myserver.com:81).

How to make Fiddler listen to a website on port 81?

Is it possible to make Fiddler capture traffic for a website on port 81 using IIS7
Sure - Fiddler will capture all traffic going through WinINET. You can also capture localhost traffic if you use http://ipv4.fiddler:NNN as your server instead of http://localhost:NNN (where :NNN is the port that you're connecting to).
I don't believe (or at least I haven't found a way) to have Fiddler only capture a specific port for a specific host (like capturing only port 81 on localhost instead of capture all port traffice on localhost).
HTH!
If your site is running on your local machine (127.0.0.1) take a look at the Fiddler Network configurations about
monitoring local traffic

Resources