Jump to content

I have error secure apache on Digital Ocean?


Recommended Posts

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!

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 for
new 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?
 

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://.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.