-2

Is Apache or IIS or a similar service actually required to make web content available to the internet? For example, say I had web content at /var/www/index.html. If a user fired up a browser and navigated to http://www.myaddress.com/var/www/html.index could their browser resolve that web content? Or does http actually require the server to be running a web service that can respond to http?

  • Yes it is required one very basic reason is there would be nothing listening on the port for your browser to connect to. Opening a port and getting a response are very different – Drifter104 Aug 02 '15 at 22:16
  • 3
    Do yourself a favor and find a new instructor and/or a new school. Your instructor doesn't sound qualified to be teaching this class. – joeqwerty Aug 02 '15 at 22:19
  • @joeqwerty He is not. Wish I could. – Digital Impermanence Aug 02 '15 at 22:22
  • You could use an old PC or something like that to set up a test machine and try it if you like, but others have answered your question. (Don't put it on the Internet. Only try this on your local network. If you put it on the Internet, you might get a practical demonstration of how quickly They [TM] find you.) – Katherine Villyard Aug 02 '15 at 23:02
  • Is the JRE required to run a Java application? – Michael Hampton Aug 03 '15 at 00:52

1 Answers1

1

If there is no (web)server installed or running, no service is listening. If there ist no server listening, the client can't connect and will run into a "Connection refused" error.

A very nice explanation how the communication of a client and a server works, can be found here: http://www.thegeekstuff.com/2011/11/tcp-ip-fundamentals/

redimp
  • 111
  • 3
  • So running rhel 7 w/o httpd will NOT work? It absolutely requires httpd or something similar to be running? – Digital Impermanence Aug 02 '15 at 22:19
  • I suppose you could run an ftp server instead. But if you're going to the trouble of setting up an ftp server you might aswell setup an http server instead – BeowulfNode42 Aug 02 '15 at 22:22
  • @BeowulfNode42 So running a server OS is not enough. There actually needs to be a dedicated web server service running on that server OS like Apache, IIS, etc.? – Digital Impermanence Aug 02 '15 at 22:23
  • you could setup a simple http server on your computer at home, and forward port 80 from your modem to that computer. This would make the html content available to the public internet. It may help if you install some sort of dynamic dns client on the computer at home. – BeowulfNode42 Aug 02 '15 at 22:24
  • If you want a (web-)service, you need a (web-)server. tl;dr Yes, you need httpd or somethign similar. – redimp Aug 02 '15 at 22:24
  • yes, there are plenty available and they are easy enough to setup – BeowulfNode42 Aug 02 '15 at 22:24
  • @BeowulfNode42 That's not my question. I can manage Apache. What I want to know is if it is absolutely required? Another way to ask this is this: if I am running Windows Server 2012 is IIS required to make web content available to the internet? No ftp, no IIS, no nothing besides the server OS? – Digital Impermanence Aug 02 '15 at 22:25
  • @BeowulfNode42 Okay. And that's what I thought. But know one in the class knew enough, including the professor, to actually understand what I was saying..so I even doubted myself. Mistake (sort of)! – Digital Impermanence Aug 02 '15 at 22:27
  • Bottom line, you need an application listening on a port that knows how to "speak" the HTTP protocol. It doesn't have to be IIS on Windows and it doesn't have to be Apache on Linux. You could hypothetically write your own from scratch using only a built-in scripting language on your platform of choice. It's just not a very smart option. – Ryan Bolger Aug 03 '15 at 05:02