Skip to content

Latest commit

 

History

History
73 lines (58 loc) · 1.84 KB

20140512.md

File metadata and controls

73 lines (58 loc) · 1.84 KB

apache

今天apache關掉之後又特麼打不開了

the requested operation has failed

之前的原因是端口被IIS佔用了,但是用之前的方法一查發現這次IIS並沒有佔用80端口,後來在服務中啟動Apache的時候在errorlog中找到了錯誤編號

os 1069

一google是登錄失敗,然後用了系統管理員啟動apache成功了,那說明的確是低權限用戶過期了,然後在管理工具->計算機管理->用戶與用戶組中雙擊低權限用戶,然後設置其密碼永不過期,就ok了

  • apache設置ip過濾

一個很好的示例 detail

Allow from 10.1.0.0/16

表示網管是10.1.0.0,子網掩碼是16位的也就是高位16個1,低位16個0,也就是255.255.0.0 所以,上面的表示方法和下面的等價

Allow from 10.1.0.0/255.255.0.0

detail

  • 注释了
<Directory />
    Order allow,deny
	Allow from all
</Directory>
  • 修改了.htaccess
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
   Order deny,allow
   Allow from 10.0.0.0/8
   Allow from 58.192.112.0/20
   Allow from 121.249.0.0/19
   Allow from 121.248.48.0/20
   Allow from 121.249.0.0/19
   Allow from 172.16.0.0/12
   Allow from 192.168.0.0/16
   Allow from 202.119.0.0/19
   Allow from 202.119.144.0/20
   Allow from 211.65.32.0/19
   Allow from 211.65.194.0/24
   Allow from 211.65.232.0/22
   Allow from 223.3.0.0/16
   #Allow from 223.3.4.185/255.255.0.0
   Allow from 183.157.160.1
   Allow from 36.16.8.72
   Allow from 117.136.35.25
   Allow from 223.3.120.121
   Deny from all
</IfModule>