More tidying

This commit is contained in:
Bob Mottram 2014-04-16 07:41:02 +01:00
parent 8bbc4b50b8
commit 49de401df5
1 changed files with 11 additions and 6 deletions

View File

@ -1125,8 +1125,8 @@ iptables -A INPUT -p udp --match multiport --dports 465,22,5222,5223,5269,5280,5
iptables -A INPUT -p tcp --dport 22 -m limit --limit 3/minute --limit-burst 1 -j ACCEPT
# Limit web connections
iptables -A INPUT -p tcp --dport 80 -m limit --limit 3/minute --limit-burst 1 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -m limit --limit 3/minute --limit-burst 1 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -m limit --limit 30/minute --limit-burst 5 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -m limit --limit 30/minute --limit-burst 5 -j ACCEPT
# Limit number of XMPP connections
iptables -A INPUT -p tcp --match multiport --dports 5222:5223,5269,5280:5281 -m limit --limit 3/minute --limit-burst 1 -j ACCEPT
@ -3995,12 +3995,17 @@ Edit your Apache configuration and disable the port 80 (HTTP) version of the sit
emacs /etc/apache2/sites-available/mydomainname.com
#+END_SRC
Within the section which begins with *<VirtualHost *:80>* change the following:
Replace the section which begins with *<VirtualHost *:80>* with the following:
#+BEGIN_SRC: bash
<Directory /var/www/mydomainname.com/htdocs/>
deny from all
</Directory>
<VirtualHost *:80>
ServerAdmin myusername@mydomainname.com
ServerName myredmatrixdomainname.com
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
#+END_SRC
Save and exit, then restart the apache server.