Should I delete the virtual host on port 80 since I never use it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, I believe the virtual server on port 80 contains redirection to https://subdomain.yourdomain.something. So, if you remove it (and restart apache2), you will have to put https prefix before your websie address every time you want to access your website (unless your web browser is configured to enforce https connection). Automatic redirection will be no longer performed.
Hello,
As @Yannek explained it creates a redirection from port 80 to port 443. Let me explain a little further so that’s its clear why exactly this happens.
Let’s make an example so it’s easier to explain. Imagine you have a website examplewebsite.com. When you want to load the website in your browser, you often type just the domain - examplewebsite.com. You don’t write - https://examplewebsite.com so when you load it, it loads by default with the HTTP protocol. This protocol answers on port 80. Now every application or in the webservice’s configuration has a redirection rule from HTTP to HTTPS (80 to 443).
Removing this rule will make all requests to examplewebsite.com unreachable thus removing the part where it does the redirection.
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.