Plesk

Unable to reconfigure apache server.conf: RemoteIP: Error parsing IP RemoteIPInternalProxy

Symptoms

Cause

This issues is caused by a known Plesk bug with ID PPPM-14195. The bug prevents the server.conf file of Apache from being reconfigured when a great number of IP addresses are added to the server. A fix will be applied in future updates of Plesk.

Resolution

Until the bug is resolved permanently, you may apply the following workaround:

1. Log into your server via SSH

2. Use your favorite command-line text editor to update the default Plesk template file /usr/local/psa/admin/conf/templates/default/server/remoteip.php with the following content:

<IfModule <?php echo $OPT['mod'] ?>>
<?php
$ipAddresses = $VAR->server->webserver->listenLocalhost ?
[$VAR->server->ipAddresses->loopbackIpAddress] :
$VAR->server->ipAddresses->all;
$vhostIpCapacity = $VAR->server->webserver->apache->vhostIpCapacity;
?>
<?php for ($ipAddress = reset($ipAddresses); $ipAddress; $ipAddress = next($ipAddresses)): ?>
RemoteIPexternalProxy <?php echo $ipAddress->address ?><?php for ($n = 1; $n < $vhostIpCapacity && $ipAddress = next($ipAddresses); $n++) { echo " {$ipAddress->address}"; } ?>
<?php echo "n"; ?>
<?php endfor; ?> RemoteIPHeader X-Forwarded-For
</IfModule>

3. Save the changes

4. Reconfigure the Apache server.conf file via Tools & Settings > Webserver Configurations Troubleshooter once again

Exit mobile version