• 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

Multiple IP addresses per subscription in Plesk 11?

rosskendall

Basic Pleskian
I've added my comment to a post in the Plesk 10 forum here:
http://forum.parallels.com/showthread.php?t=259050

But I was wondering if anyone here knows if it is possible (via control panel or work-around) to have domains with different IPs share the same document root in Plesk 11? I'm not sure if there is any difference in this respect with Plesk 10 (but I hope so).

Thanks.
 
Hi Ross,

There's no difference between Plesk 10 and 11 in this respect so long as you do not use Nginx, as you can't use vhost.conf style overrides within Plesk 11 Nginx (however you could code new nginx vhost templates that allow you to do this).

As regards actually doing it there are 3 methods that I'm aware of :

1) Just use symlinks
2) Using a vhost.conf and mod_php open up the basedir on the pointing domain to include the pointed domain
3) Using a vhost.conf and mod_php set the documentroot on the pointing domain to be the docroot of the pointed domain.

There is extra stuff required in the vhost.conf files (and vhost_ssl.conf files if SSL is being used) and you could probably do this with fastcgi rather than mod_php (in which case option 3 should be the one to work), but you should be able to Google the necessary (by say Googling "nublue magento multistore guide" which should point you to a guide on option 2).

You do also have the option of relying on SNI rather than separate IP addresses the primary limitation of which is that you are excluding Windows XP Internet Explorer users (wikipedia article on sni. Given that RIPE has now effectively run out of IP addresses SNI is about to become significantly more prevalent.

Paul.
 
Hi Paul,

Thanks for your helpful reply. Unfortunately I couldn't find much with your suggested Google search. (I found a NuBlue Magento multistore guide, but it just seemed to be talking about Magento, not Plesk/apache config)

I'm going with the approach of using 2 subscriptions (with separate IP addresses) with a domain in 1 subscription sharing the document root of a domain in the other subscription. Also, am using Fast-CGI not mod_php.

Just had a quick go at using a symlink to point one docroot to the other, but just getting 403 Forbidden error, so a bit more to do there. (need to check if Apache is allowed to follow symlinks on my install).

I'll report back if/when I get something working.

Cheers,
Ross.
 
OK, seem to have it working now.

With FastCGI symlinks can't be used (due to suexec), so using vhost.conf and vhost_ssl.conf to change the DocumentRoot is the way to go. It is also worth mentioning that the PHP open_basedir restriction needs to have the new docroot location added (this can be done via the control panel PHP Settings for the domain).

Using 2 domains: example.com and example.net set up as separate subscriptions so that separate IP addresses can be assigned. Choosing example.com as the main domain which will act as the central document root "/var/www/vhosts/example.com/httpdocs"

Here then is an example vhost.conf (for PHP as fastcgi) for example.net (bold bits show where it differs from default include):


#File located in: /var/www/vhosts/example.net/conf/vhost.conf

#Change suexec user to the same as the new target document root.
<IfModule mod_suexec.c>
SuexecUserGroup "comuser" "psacln"
</IfModule>

DocumentRoot "/var/www/vhosts/example.com/httpdocs"

<Directory /var/www/vhosts/example.com/httpdocs>
<IfModule mod_fcgid.c>
<Files ~ (\.php)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
allow from all
</Files>
</IfModule>
Options -Includes -ExecCGI
</Directory>



#File located in: /var/www/vhosts/example.net/conf/vhost_ssl.conf

<IfModule mod_suexec.c>
SuexecUserGroup "comuser" "psacln"
</IfModule>

DocumentRoot "/var/www/vhosts/example.com/httpdocs"

<Directory /var/www/vhosts/example.com/httpdocs>
<IfModule mod_fcgid.c>
<Files ~ (\.php)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
allow from all
</Files>
</IfModule>
SSLRequireSSL
Options -Includes -ExecCGI
</Directory>
 
Last edited:
This is a must have feature because we still have customers with Windows XP using IE and others behind a proxy that is not able to handle SNI.
What about Plesk 11.5, I hope there is an option to add multiple ip addresses to one subscription.
 
Last edited:
Back
Top