Welcome! Log In Create A New Profile

Advanced

Handling http and https requests using a single port

Posted by alemartini 
Handling http and https requests using a single port
July 27, 2009 11:44PM
Hi, i was wondering if nginx is able to handle http and https requests on the same port.

This is what i'm trying to do. I'm running a web server (lighttpd) handling http requests, and a C program that serves a particular section of the document tree through https. These processes run on the same server. At the firewall level, i can have only one port sending traffic to this server. So what i'd like to do is to set up nginx on this server so that it listens for requests on a single port and then:

a) sends all http requests so that they go to localhost:8080 (lighttpd)
b) if a user requests a URL starting with http://myhost.com/app, it sends that request to localhost:8008 (C program). Note that in this case, traffic between the browser and nginx must be https.

Do you think this could be possible?


Thanks in advance,
Alex
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 188
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready