mstdmstdd Posted November 18, 2018 Share Posted November 18, 2018 Hello, I want to set https for my hosting on ubuntu 18 under Digital Ocean as it is written here:https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04 But I had problems with ufw settings: # sudo ufw status Status: inactive root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw allow 'Apache' Rules updated Rules updated (v6) root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw status Status: inactive root@nsn-do-lamp:/etc/apache2/sites-available# sudo systemctl reload apache2 root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw status Status: inactive root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw allow 'Apache Full' Skipping adding existing rule Skipping adding existing rule (v6) root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw delete allow 'Apache' Rules updated Rules updated (v6) root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw status Status: inactive I see that status is inactive. I tried to make : # sudo ufw app list Available applications: Apache Apache Full Apache Secure OpenSSH root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw allow 'Apache' Rules updated Rules updated (v6) root@nsn-do-lamp:/etc/apache2/sites-available# sudo ufw status Status: inactive I think this error is critical and did not proceed with next commands. Why error and how to fix it ? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/307909-i-have-error-secure-apache-on-digital-ocean/ Share on other sites More sharing options...
requinix Posted November 18, 2018 Share Posted November 18, 2018 Is UFW enabled? Do you even need UFW enabled? 1 Quote Link to comment https://forums.phpfreaks.com/topic/307909-i-have-error-secure-apache-on-digital-ocean/#findComment-1562215 Share on other sites More sharing options...
mstdmstdd Posted November 19, 2018 Author Share Posted November 19, 2018 Thank you! Command sudo ufw enable was helpfull But next I was asked : Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. ------------------------------------------------------------------------------- Quote 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this fornew sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. I suppose I have to select point 2) I want to set to my https site, but the thing is that I gave the url of my site with http protocol. Could it be a problem with old url? Quote Link to comment https://forums.phpfreaks.com/topic/307909-i-have-error-secure-apache-on-digital-ocean/#findComment-1562229 Share on other sites More sharing options...
requinix Posted November 19, 2018 Share Posted November 19, 2018 As long as you don't have any <form method=POST>s pointing to a http:// URL then you're okay because it will redirect. But you should avoid those redirects whenever possible, ie. any URL you construct needs to say https://. Quote Link to comment https://forums.phpfreaks.com/topic/307909-i-have-error-secure-apache-on-digital-ocean/#findComment-1562232 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.