• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Input How to use Multiple IP's for 1 Domain [IMPORTANT FEATURE THAT'S MISSING NATIVELY]

boostedhost

New Pleskian
Server operating system version
Ubuntu 20 & 22
Plesk version and microupdate number
18
Assigning two different IPs to one website is absolutely possible. Let me explain how, as it took me quite a bit of headache to figure this out.

Step 1:
Add the secondary IP to your Plesk server, but don't assign it to any websites. You don’t need to associate it directly with any domain.

Step 2:
FTP into your server and navigate to /opt/psa/admin/conf/templates/default/domain. Open the nginxDomainVirtualHost.php file.

In this file, you’ll see a lot of code, but don’t worry—you only need to add four lines. Here's what to add:

PHP:
server {
<?php if ($OPT['ssl'] && $OPT['http3']) : ?>
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] ?> quic;


--->listen YOUR SECOND IP:<?php echo $OPT['frontendPort'] ?> quic; <---


add_header Alt-Svc <?php echo '\'h3=":' . $OPT['frontendPort'] . '"; ma=86400\'' ?>;
<?php endif; ?>
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>;


---->listen YOUR-SECOND-IP:<?php echo $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>; <---


<?php if ($OPT['ssl'] && $OPT['http2']) : ?>
http2 on;
<?php endif; ?>

Further down in the file, you’ll find another similar block. Update it as well:

PHP:
server {
<?php if ($OPT['ssl'] && $OPT['http3']) : ?>
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] . ' quic' . ($OPT['default'] ?  ' reuseport' : '') ?>;

--->listen YOUR-SECOND-IP:<?php echo $OPT['frontendPort'] ?> quic; <------

add_header Alt-Svc <?php echo '\'h3=":' . $OPT['frontendPort'] . '"; ma=86400\'' ?>;
<?php endif; ?>
listen <?php echo $OPT['ipAddress']->escapedAddress . ':' . $OPT['frontendPort'] .
($OPT['default'] ? ' default_server' : '') . ($OPT['ssl'] ? ' ssl' : '') ?>;

---->listen YOUR-SECOND-IP:<?php echo $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>; <----

<?php if ($OPT['ssl'] && $OPT['http2']) : ?>
http2 on;
<?php endif; ?>

Make sure to remove the --> and <-- markers, and replace "YOUR-SECOND-IP" with the actual IP you’re adding.

Final Step:
Restart NGINX with
Code:
systemctl restart nginx
and regenerate all domain configurations on your Plesk server by running the following command via SSH:
Code:
plesk repair web -y
 
Please do not edit the default templates directly because they WILL get overwritten. Instead, the best way to edit it would be to to make a copy of the template you want to edit (nginxDomainVirtualHost.php in this case) to /usr/local/psa/admin/conf/templates/custom (so in your case, you'll want to copy /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php to /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php)

You can refer to Changing Virtual Hosts Settings Using Configuration Templates for how to properly edit the templates to further customize it to your needs.
 
Back
Top