Host website on port 443?
I'm hosting a website on my Ubuntu Server. The website is up and running. I created an A record in GoDaddy.com to point the namespace to my public IP. All this is good but I'm only using port 80 (http). I want to use port 443, however if I use the namespace w/ port 443 I get my firewalls login page.
How can I use port 443 for both my website and for the firewall login page? I don't want to give up one for the other. I know it's something simple and stupid I just never hosted a website before, but I want to be secure with the connection. Btw, this is all a home lap experiment. Thanks |
It depends on which webserver(s) you are using, and your network setup.
If the public IP address is directly assigned to the Ubuntu server, getting your website to work on port 443 is a matter of configuring the web server and/or the firewall web GUI. If the firewall is your router and you're forwarding port 80 to the Ubuntu server, you'll have to move the firewall GUI to a different port. |
My firewall is my router (fortinet 60d). I know I can configure the firewall the port forward all https traffic to the web server, but I would lose the ability to login on to my firewall...right? Wouldn't that stop me from being able to login my firewall w/ https?
How can I use https for both the website and the firewall? |
Just move the firewall GUI to another port, then forward port 443 to the Ubuntu server.
|
I am guessing you are trying to access the server from within your LAN using your public IP. Seeing your router's configuration webpage is normal and you should still be able to access the server from within the LAN using its LAN IP address.
Without changing anything you should be access your server from outside your LAN. A quick test would be to turn off your smartphone or other similar device's wifi and try to access your website using https. If it all works you really do not need to change anything if you can not change the router's port. |
Is your web server listening on port 443? What does
Code:
netstat -tnlp Use of the secure port is managed in the web server configuration. We redirect all http requests to https there...and yes, obviously, you need to have port 443 open in your firewall... You'll also need a certificate for the site... |
Quote:
Apparently that is what you want. Assigning a different port is not enough, you need to set up SSL keys (either self-made, in which case most browsers are going to complain, or purchased, or created with letsencrypt) and tell your server software to actually serve traffic encrypted with these keys. There's Gazillions of tutorials covering this particular topic. I recommend tutorials from digitalocean |
3 Attachment(s)
Quote:
Also I added the ufw status (see attached). |
You should set up the rule for port 443 in your firewall
|
Do you have these settings below in your Apache config, I think it's httpd.conf. Haven't played Apache for a while don't know which file to configured for the listening port.
Like: Listen 443 Or check out this link: https://bobcares.com/blog/apache-not...g-on-port-443/ |
All times are GMT -5. The time now is 10:42 AM. |