server {
listen xx.xx.xx.xx:80;
location / {
proxy_pass http://xx.xx.xx.xx:7080;
}
}
server {
listen [2a01:xx:xx:xx......]:80 ipv6only=on;
location / {
proxy_pass http://127.0.0.1:7080;
}
}
[root@a10-52-53-101 ~]# mkdir /usr/local/psa/admin/conf/templates/custom
[root@a10-52-53-101 ~]# mkdir /usr/local/psa/admin/conf/templates/custom/server
[root@a10-52-53-101 ~]# cp /usr/local/psa/admin/conf/templates/default/server/nginxVhosts.php /usr/local/psa/admin/conf/templates/custom/server
[root@a10-52-53-101 ~]# diff --ignore-all-space /usr/local/psa/admin/conf/templates/default/server/nginxVhosts.php /usr/local/psa/admin/conf/templates/custom/server/nginxVhosts.php
30c30
< proxy_pass https://<?php echo $ipAddress->proxyEscapedAddress . ':' . $OPT['backendPort']; ?>;
---
> proxy_pass https://<?php echo $ipAddress->escapedAddress . ':' . $OPT['backendPort']; ?>;
32c32
< proxy_pass http://<?php echo $ipAddress->proxyEscapedAddress . ':' . $OPT['backendPort']; ?>;
---
> proxy_pass http://<?php echo $ipAddress->escapedAddress . ':' . $OPT['backendPort']; ?>;
[root@a10-52-53-101 ~]# mkdir /usr/local/psa/admin/conf/templates/custom/domain
[root@a10-52-53-101 ~]# mkdir /usr/local/psa/admin/conf/templates/custom/domain/service/
[root@a10-52-53-101 ~]# cp /usr/local/psa/admin/conf/templates/default/domain/service/proxy.php /usr/local/psa/admin/conf/templates/custom/domain/service/
[root@a10-52-53-101 ~]# diff /usr/local/psa/admin/conf/templates/default/domain/service/proxy.php /usr/local/psa/admin/conf/templates/custom/domain/service/proxy.php
8c8
< proxy_pass https://<?php echo $OPT['ipAddress']->proxyEscapedAddress . ':' . $OPT['backendPort'] ?>;
---
> proxy_pass https://<?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['backendPort'] ?>;
10c10
< proxy_pass http://<?php echo $OPT['ipAddress']->proxyEscapedAddress . ':' . $OPT['backendPort'] ?>;
---
> proxy_pass http://<?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['backendPort'] ?>;
[root@a10-52-53-101 ~]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
<IfModule rpaf_module>
RPAFenable On
# When enabled, take the incoming X-Host header and
# update the virtualhost settings accordingly:
RPAFsethostname On
# Define which IP's are your frontend proxies that sends
# the correct X-Forwarded-For headers:
RPAFproxy_ips 127.0.0.1 ::1
# Change the header name to parse from the default
# X-Forwarded-For to something of your choice:
# RPAFheader X-Real-IP
</IfModule>
<IfModule rpaf_module>
# Define which IP's are your frontend proxies that sends
# the correct X-Forwarded-For headers:
RPAFproxy_ips 127.0.0.1 ::1 2001::[...]:27 2001::[...]:28
</IfModule>
proxy_pass https://<?php '[::1]:' . $OPT['backendPort']; ?>;
or
proxy_pass https://<?php '127.0.0.1:' . $OPT['backendPort']; ?>;