Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Wilson Edwards
at 2025-07-12 21:59:25
Point:500 Replies:1 POST_ID:829371USER_ID:12108
Topic:
apache;cloudflare;.htaccess
as Title
Please advise
Accepted Solution
Author: Wilson Edwards replied at 2025-07-12 22:08:57
500 points Excellent
The problem is solved;
Since u may be using http forwards to https;
Cloudflare may not need your virtural host with 443, so cloudflare will provide new SSL cert to you to replace your Let's encrypt one.
Now we focus on :80 virtualhost setup at /etc/httpd/conf/httpd.conf file
set Allow override All instead of Allow override none that allow .htaccess to do some operation
it mentioned this athttps://computer28.com/hk/question/829274/Why-my-Apache-server-can-not-block-IP-in-htaccess/index.php
now final step at .htaccess file, put this
<IfModule mod_setenvif.c>
# SetEnvIf X-Forwarded-For "62.88.92.88" block_ip
SetEnvIf CF-Connecting-IP "62.88.92.88" block_ip
</IfModule>
<IfModule mod_authz_core.c>
<RequireAll>
Require all granted
Require not env block_ip
</RequireAll>
</IfModule>
it works, now
Notice:
---------------
that depend on your cloudflare setting, some may useX-Forwarded-For
and need to setup this
<IfModule mod_remoteip.c>
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxyList /etc/httpd/conf/ip.lst
RemoteIPHeader CF-Connecting-IP
RemoteIPTrustedProxyList /etc/httpd/conf/ip.lst
</IfModule>
iplst file at /etc/httpd/conf:
173.245.48.0/20
103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
141.101.64.0/18
108.162.192.0/18
190.93.240.0/20
188.114.96.0/20
197.234.240.0/22
198.41.128.0/17
162.158.0.0/15
104.16.0.0/13
104.24.0.0/14
172.64.0.0/13