Symptoms
- Plesk Obsidian versions 18.0.56 (all updates) and 18.0.57 running on a Linux-based operating system
- Reconfiguration of the Apache
/etc/httpd/conf/plesk.conf.d/server.conf
file via Tools & Settings > Webserver Configurations Troubleshooter fails with the following error:Syntax error on line 4215 of /etc/httpd/conf/plesk.conf.d/server.conf: RemoteIP: Error parsing IP RemoteIPexternalProxy (Name or service not known error) for RemoteIPInternalProxy.
- The server is configured to use more than 100 dedicated IP addresses
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