Zen Cart Logo
Forums / General Questions / Can A Port Other Than 443 Be Used For SSL?

Can A Port Other Than 443 Be Used For SSL?

Views: 16,915

Results 1 to 8 of 8
16 Jul 2013, 8:44 PM
#1
quawk avatar

quawk

New Zenner

Join Date:
Jan 2012
Posts:
10
Plugin Contributions:
0

Can A Port Other Than 443 Be Used For SSL?

I'm running Zencart version 1.5 on Windows Small Business Server 2011 which I host in my home. This server also has Exchange Server and Share Point Server running, these and other built in servers all need port 443 in order to function properly. Is there a way to assign another port to Zencart, such as port 8090? I can make the necessary changes in my Internet Information Server (IIS) and do port forwarding in my router, all of that is easy, but I have no idea of what code to alter in Zencart. Zencart and the built in servers will not share port 443, at this point I must use one or the other. I've currently disabled SSL on my Zencart site.
I've read the Zencart manual I bought and searched the forums here but have not been able to find anything close to an answer. Most of the SSL related issues are with setting it up, not modifying the SSL port number. No need to post SQL or PHP version as they are up-to-date and functioning fine. Nor are there install issues. My site is http://www.prisonart.org (I sell the arts and crafts of prisoners).

16 Jul 2013, 9:19 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Can A Port Other Than 443 Be Used For SSL?

Go to admin > tools > developers tool kit and do a search for '443' (without the quotes). That gives you all relevant files.

DrByte would be the expert to answer this :yes:

I have never done this as I would not use any M$ powered server(s). IMHO you would fare much better using any Linux server, such as Ubuntu Server, Zentyal, CentOS etc and hook that box onto your router - for several reasons:

  • cost (zilch)
  • reliability
  • speed
  • ease of configuration
  • and most of all security

That's the stuff that powers the big ones such as Google, Yahoo!, Facebook etc etc

Just my 2 cents...

16 Jul 2013, 9:24 PM
#3
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Can A Port Other Than 443 Be Used For SSL?

It may be easier to simply assign a second IP address to the server (specifically for web traffic).

17 Jul 2013, 12:11 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Can A Port Other Than 443 Be Used For SSL?

When you type "http://" your browser interprets that as "use port 80 to find the address shown next.
When you type "https://" your browser interprets that as "use port 443 ...".

So, when your CUSTOMERS access your site using "https://...." THEY will be trying to arrive to your site on port 443.

Thus, as long as your external firewall can properly forward port 443 incoming traffic to whatever alternate port your server is using, and send its responses back out in a way the customers' browser understands, you'll be fine.

Sometimes configuring a separate IP is handy for that, but IIS is an odd duck and an extra IP might not actually make any difference. I avoid IIS whenever possible.

17 Jul 2013, 6:42 PM
#5
quawk avatar

quawk

New Zenner

Join Date:
Jan 2012
Posts:
10
Plugin Contributions:
0

Re: Can A Port Other Than 443 Be Used For SSL?

In response to the Linux proponent, Small Business Server has Sharepoint Server and Exchange Server, both of which offer powerful tools I need. I've used Linux (Red Hat and Ubuntu) and find the Microsoft product better meets my needs. The problem is that Sharepoint and Exchange want port 443.
I did assign a second IP address to the server and routed port forwarding for 443 to 8090 on my website. But probably due to this being a Microsoft product it would not work.
I also searched for all of the files in my store that contained the number 443, there were a lot of them, too many for me to want to edit. As for Dr. Byte's suggestion, if I forward all 443 traffic to the alternate port then my Exchange and Sharpoint will be broken, as they are hard coded to use 443. At this point the only option I can see is to go into the programming of Zencart and manually change all references from 443 to 8090. Short of that I see not solution other than disabling SSL altogether.

17 Jul 2013, 8:49 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Can A Port Other Than 443 Be Used For SSL?

Did you try changing the settings for your the IIS site hosting your Sharepoint and Exchange Server to only listen on localhost and your primary IP Address? You can then add a new IIS site (with a different doc_root) listening (bound) only to the secondary IP address and use this new IIS site to host Zen Cart.

Then you just point to the new IP address to access Zen Cart. Typically if you plan to host the IIS sites services over the public internet both IP addresses will need to be "public" IP Addresses (and you will need your SSL certificate to be valid for the second IP address). You can use a "private" IP address if you want Zen Cart only available on your local "internal" network. With this setup there is no need to do any "port forwarding".

17 Jul 2013, 9:10 PM
#7
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Can A Port Other Than 443 Be Used For SSL?

Quawk:

In response to the Linux proponent, Small Business Server has Sharepoint Server and Exchange Server, both of which offer powerful tools I need. I've used Linux (Red Hat and Ubuntu) and find the Microsoft product better meets my needs. The problem is that Sharepoint and Exchange want port 443.

Google 'MindTouch Core' or 'Alfresco 2.1' as alternatives to SharePoint Server and 'Open Source Alternatives to Microsoft Exchange'. You will find open source packages that fill your needs without having to disable SSL on your Zen Cart installation.

17 Jul 2013, 9:35 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Can A Port Other Than 443 Be Used For SSL?

Quawk:

I also searched for all of the files in my store that contained the number 443, there were a lot of them
Altering ANY Zen Cart files regarding port 443 is pointless.

You're not understanding how SSL works.
And I guess my explanation above where I said that "https://" literally means "port 443".

Quawk:

At this point the only option I can see is to go into the programming of Zencart and manually change all references from 443 to 8090.
All Zen Cart does regarding port 443 is use it as an aid to help detect whether the site is in SSL mode when all the normal SSL indicators don't automatically fire. So touching any ZC files to "change SSL from port 443" is a foolish endeavor.

Quawk:

As for Dr. Byte's suggestion, if I forward all 443 traffic to the alternate port then my Exchange and Sharpoint will be broken, as they are hard coded to use 443.Looks like your environment (server and firewall) just isn't up to the task of running both regular web content and also Exchange/Sharepoint.
Your firewall is limiting you to one IP and your port-forwarding concept can't work when you're restricted like that.
This has nothing to do with Zen Cart. Zen Cart is just a normal web application. And your customers NEED it to handle SSL on port 443. Otherwise their browsers won't understand what to do. Read below ...

You have TWO OPTIONS:
a) put your server in a datacenter so you can use multiple IP addresses. Your firewall is limiting you to one IP and your port-forwarding concept can't work when you're restricted like that.
b) do it the way that looks ugly and confusing to your customers, and is likely to drive them away due to the confusion it will cause: change your HTTPS_SERVER setting from 'https://www.example.com' to 'https://www.example.com:8090'
This will cause your customers to literally see that in their browser. It will probably also set off all their firewall warnings asking them "are you sure you want to visit this site over this unusual port number?"
Remember: during checkout is the worst time for a customer to be presented with a security warning, and that's exactly what you're about to do.