• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How-To: Host 1 site on multiple IP's

StéphanS

Regular Pleskian
Say that you want to give a site a new IP, eg. for SSL purposes.

But you don't want the site to get interupted longer than a few seconds,
and the TTL for the domain is set horribly high.

The fix for this would be:


Code:
Switch the IP for the site in Plesk to the new (dedicated) IP.

then:

Code:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domainname>
cd /var/www/vhosts/[system/]<domainname>/conf/
grep -v '^#' last_httpd.include | sed '1s@^@\n\n\n\n\n\n\n\n\n\n@;s@<new_ip>@<old_ip>@g' >> last_httpd.include
service httpd restart


Note that Plesk will overwrite these changes once it reconfigures the domain.

You could chattr +i /usr/local/psa/admin/conf/vhosts_bootstrap.conf
But I strongly suggest against doing this on a shared webhosting server.




Would Parallels be able to allow Plesk to assign multiple IP's to 1 domain?
This would make transitions to dedicated IP for SSL purposes so much easier! :)
 
I have used the custom vhost templates before to integrate PHP-FPM.

It is indeed very possible to do it like this, but this would require you to have a list of domains this applies to, and a list of extra ip's they require.


I don't think that many people will be willing / able to do these kinds of customizations.



Other panels like DirectAdmin already have a system in place for this: http://help.directadmin.com/item.php?id=397


There seems to already be a UserVoice about this: http://plesk.uservoice.com/forums/1...ave-multiple-ips-in-one-subscription#comments
 
I have used the custom vhost templates before to integrate PHP-FPM.

It is indeed very possible to do it like this, but this would require you to have a list of domains this applies to, and a list of extra ip's they require.


I don't think that many people will be willing / able to do these kinds of customizations.

We actually have our own tool to do this within Nginx (from the sound of things you're not using Nginx).

Within Nginx its just as easy as you mention (and these technique would work with Apache configs too) we just copy the domain nginx conf file to /etc/nginx/conf./d and sed the real IP with the IP to be duplicated. The disadvantage to this is if they do something like rename or delete the domain then things go very badly wrong, but as this is a short term fix and with education we find the risk of that to be low.

On Plesk 8/9 we used the technique you describe alongside a wrapper around websrvmng that would log to a file if websrvmng was run which was then checked every 5 minutes by cron but that of course could result in a few minutes of site downtime (thinking about it I'm not entirely sure why we logged then ran a cron rather than just fixing at the time, it may have been a reluctance to keep running websrvmng).

I'm actually quite interested in your templates for php-fpm and Apache and was wondering if you'd got these setup purely within the templates or whether the PHP handler could cope with php-fpm? I'd much prefer that the latter that set php-fpm but its fairly clear from the documentation I've glanced at that its nginx -> php-fpm and not nginx -> apache -> php-fpm, I have no interest in the former, our customers would be lost without .htaccess functionality.

paul.
 
It's handled via /usr/local/psa/admin/conf/templates/custom/service/php_over_fastcgi.php and /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php .
I haven't gotten around to finishing this project though.

The proof of concept is done, I can register PHP-FPM as a handler, and then have the template know to switch to mod_fastcgi.c instead of mod_fcgid.c
phpinfo for the test site then correctly displays the FPM version used.

The work that needs to be done, is creating different FPM instances per site and configuring them per site.
Each FPM instance needs its own port, etc etc. (not sure about this part)


Are you by any chance attending Parallels Summit this year?
 
Back
Top