fix ip behind proxy
This commit is contained in:
parent
a24bd0c638
commit
94ac88a514
1 changed files with 12 additions and 11 deletions
|
|
@ -1,19 +1,20 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
#ServerName www.example.com
|
#ServerName www.example.com
|
||||||
|
|
||||||
ServerAdmin contact@
|
ServerAdmin contact@
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
|
|
||||||
<Directory /var/www/html>
|
|
||||||
Options Indexes FollowSymLinks MultiViews
|
|
||||||
AllowOverride All
|
|
||||||
Order allow,deny
|
|
||||||
allow from all
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
#LogLevel info ssl:warn
|
|
||||||
|
|
||||||
RemoteIPHeader CF-Connecting-IP
|
<Directory /var/www/html>
|
||||||
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
AllowOverride All
|
||||||
|
Order allow,deny
|
||||||
|
allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on
|
||||||
|
|
||||||
|
#RemoteIPHeader CF-Connecting-IP
|
||||||
|
RemoteIPHeader X-Forwarded-For
|
||||||
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue