Kaynağa Gözat

Limit Apache request sizes

Bob Mottram 11 yıl önce
ebeveyn
işleme
a02a263a9a
1 değiştirilmiş dosya ile 12 ekleme ve 1 silme
  1. 12
    1
      beaglebone.txt

+ 12
- 1
beaglebone.txt Dosyayı Görüntüle

1664
 ServerTokens Prod
1664
 ServerTokens Prod
1665
 #+END_SRC
1665
 #+END_SRC
1666
 
1666
 
1667
-Then save and exit  In the examples below replace /mydomainname.com/ with your own domain name.
1667
+Then save and exit.  Install some extra security.
1668
+
1669
+#+BEGIN_SRC: bash
1670
+apt-get install libapache2-modsecurity
1671
+apt-get install libapache2-mod-evasive
1672
+#+END_SRC
1673
+
1674
+In the examples below replace /mydomainname.com/ with your own domain name.
1668
 
1675
 
1669
 #+BEGIN_SRC: bash
1676
 #+BEGIN_SRC: bash
1670
 export HOSTNAME=mydomainname.com
1677
 export HOSTNAME=mydomainname.com
1690
 		AllowOverride All
1697
 		AllowOverride All
1691
 		Order allow,deny
1698
 		Order allow,deny
1692
 		allow from all
1699
 		allow from all
1700
+        LimitRequestBody 128000
1693
 	</Directory>
1701
 	</Directory>
1694
 
1702
 
1695
 	# Don't serve .php~ or .php# files created by emacs
1703
 	# Don't serve .php~ or .php# files created by emacs
1714
 		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
1722
 		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
1715
 		Order allow,deny
1723
 		Order allow,deny
1716
 		Allow from all
1724
 		Allow from all
1725
+        LimitRequestBody 128000
1717
 	</Directory>
1726
 	</Directory>
1718
 
1727
 
1719
 	ErrorLog ${APACHE_LOG_DIR}/error.log
1728
 	ErrorLog ${APACHE_LOG_DIR}/error.log
1740
 		AllowOverride All
1749
 		AllowOverride All
1741
 		Order allow,deny
1750
 		Order allow,deny
1742
 		allow from all
1751
 		allow from all
1752
+        LimitRequestBody 128000
1743
 	</Directory>
1753
 	</Directory>
1744
 
1754
 
1745
 	# Don't serve .php~ or .php# files created by emacs
1755
 	# Don't serve .php~ or .php# files created by emacs
1764
 		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
1774
 		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
1765
 		Order allow,deny
1775
 		Order allow,deny
1766
 		Allow from all
1776
 		Allow from all
1777
+        LimitRequestBody 128000
1767
 	</Directory>
1778
 	</Directory>
1768
 
1779
 
1769
 	ErrorLog ${APACHE_LOG_DIR}/error.log
1780
 	ErrorLog ${APACHE_LOG_DIR}/error.log