Post by kabatza1 » Fri Mar 22, 2013 1:42 am

Opencart multi-store in Plesk, different domains, different IP's...can it be done?
People will tell you no, and that you should go for the domain alias option and rely on SNI to handle the multiple SSL on the same ip.
Yes, this will work most of the time if your customer visiting the site has a newish windows version with a modern browser, but what about all these people still using windows XP? Can you afford to loose that 20%? (source: http://www.w3schools.com/browsers/browsers_os.asp)
How come out of all these people using opencart for business don't know how to do it...or do they, but they don't bother telling it to the rest of us? No more!!....I will tell everybody!! ;)
For a business website I wouldn't be too comfortable relying on the SNI and I rather do it the proper way! Now, we all know the server can do it but using plesk adds some limitations...which we need to overcome.
Where there is a problem, there is always a solution...some old guy once said.... so here it is:

THE RECIPE (Opencart multi-store alla Plesk) :crazy: LOL!
You will need:
[*]A Plesk powered VPS/Dedicated server with root access.It may work in a shared hosting using htaccess, but i have not tested it and i don't have time to do it
[*]Putty.exe (free)
[*]Filezilla or other FTP program.
[*]A text editor....like notepad++.

Step 1: Create 2 or more domains and assign a dedicated IP to each one of them, but not add them in a service plan (select none).

Step 2: Set up the main domain.
Go to the domain control panel, and then domains & settinds --> Advanced Operations --> website scripting and security.
Set: PHP support (run as fastcgi)
Install your opencart and test it!
If a session error appear when loading the site, Go back to the domain control panel -->domains & settinds --> Advanced Operations --> website scripting and security (php settings tab)
SET: session.save_path = /var/www/vhosts/Your_primary_domain_here.com/private/whatever_you_want/
of course now you need to create that dir using Filezilla and set permissions to 700.
Added benefits: :dance:
Fastcgi is more secure and will also solve the permission problems people have.755 will work just fine. (no need to set everything to 777 which I believe is unsafe!!)

Step 3: Set up additional domains:
Go to "domains & settings" --> Advanced Operations --> website scripting & security.
Set: PHP support (run as fast_cgi)
If done for the main domain also set sessions to the same directory:
SET: session.save_path = /var/www/vhosts/Your_primary_domain_here.com/private/whatever_you_want/

ALSO SET: open_basedir = /var/www/vhosts/Your_primary_domain_here.com/httpdocs/

Step 4: Use the text editor to make a file called: vhost.conf and add the following....

<IfModule mod_suexec.c>
SuexecUserGroup "primary_domain_user" "psacln"
</IfModule>
DocumentRoot "/var/www/vhosts/Your_primary_domain_here.com/httpdocs"
<Directory /var/www/vhosts/Your_primary_domain_here.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>

Step 5: Use the text editor to make a file called: vhost_ssl.conf and add the following....

<IfModule mod_suexec.c>
SuexecUserGroup "primary_domain_user" "psacln"
</IfModule>
DocumentRoot "/var/www/vhosts/Your_primary_domain_here.com/httpdocs"
<Directory /var/www/vhosts/Your_primary_domain_here.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>

Step 6: Add these files in all of the additional domains directories : var/www/vhosts/your_additional_domains.com/conf/

Step 7:
Run putty.exe and login as root.
If you only have one additional domain type in:
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain your_additional_domain.com
OR
If you have many additional domains type in:
/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Now restart it by typing in:
service httpd restart

Step 8:
Go to your opencart admin and setup the additional domains.

DONE!
Now you have one OC installation but each store has its own IP and can have its own SSL as well!
No more SSL warnings!!

I wish I could get paid for the time it took me to write all this..... :drunk:

Enjoy!!!

Newbie

Posts

Joined
Wed Jun 13, 2012 1:08 am

Post by scanreg » Tue Apr 09, 2013 6:33 am

fascinating!

i wish there were such detail on how to set it up in a cpanel vps

but great detail, thanks :)

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by butte » Tue Apr 09, 2013 10:28 am

The hosting will or will not allow you to go via ftp or winscp or such below your publically accessible area, and the hosting will or will not provide cPanel, Plesk, or any of several other control panels. The two are mutually independent to a large degree, and it just happens that very few shared hosting arrangements allow access to drop below public, and that a majority or huge plurality of the fairly usable servers will happen to provide cPanel. If you cannot go down there, then putty.exe will do you no good. If you can, then, the control panel does not matter.

If putty.exe will do you some good (you can get down there), then look at his syntax.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by scanreg » Tue Apr 09, 2013 6:17 pm

butte wrote:If you can, then, the control panel does not matter.

If putty.exe will do you some good (you can get down there), then look at his syntax.
thanks :)

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by kabatza1 » Fri May 24, 2013 1:52 am

Yes, Control panels are actually the cause of the problem because they keep updating the settings every time you change something. The reason you add the files in var/www/vhosts/your_additional_domains.com/conf/ is to force the control panel to use the setting you want.

If I find time, I may do another guide for how to do it in Webmin too.

Newbie

Posts

Joined
Wed Jun 13, 2012 1:08 am

Post by scanreg » Fri May 24, 2013 3:53 am

kabatza1 wrote:Yes, Control panels are actually the cause of the problem because they keep updating the settings every time you change something. The reason you add the files in var/www/vhosts/your_additional_domains.com/conf/ is to force the control panel to use the setting you want.

If I find time, I may do another guide for how to do it in Webmin too.
ah, so you mean that even if the control panel updates some settings that the multi-store should still work cuz the files are added in /conf/ ?

thanks

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by kabatza1 » Sat Jun 01, 2013 7:10 am

scanreg wrote:
kabatza1 wrote:Yes, Control panels are actually the cause of the problem because they keep updating the settings every time you change something. The reason you add the files in var/www/vhosts/your_additional_domains.com/conf/ is to force the control panel to use the setting you want.

If I find time, I may do another guide for how to do it in Webmin too.
ah, so you mean that even if the control panel updates some settings that the multi-store should still work cuz the files are added in /conf/ ?

thanks
Yes, this is exactly what happens.
When you run "service httpd restart " as described in my guide it will update and pick up the settings from the conf files.
As long as the files remain there, the settings will not change.

Newbie

Posts

Joined
Wed Jun 13, 2012 1:08 am

Post by scanreg » Sat Jun 01, 2013 9:58 pm

really neat!

thanks :)

Active Member

Posts

Joined
Thu May 06, 2010 12:15 am

Post by TAC » Sun Jun 01, 2014 5:16 am

Thank you kabatza1 for this - I think ;) It still looks very complicated to me ???

I have worked through the steps and created the conf folder & files but I can't work out what to do about putty.exe as I am on a Mac and anything I Google about it says it is for windows.

Any suggestions? :)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by Cleo » Mon Jun 02, 2014 7:55 am


Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by TAC » Mon Jun 02, 2014 10:40 pm

Thanks Cleo, I had read that post and it confused me even more ???

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by Cleo » Tue Jun 03, 2014 7:56 am

Oh well sorry to have confused you :ok:


Cleo

Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0


User avatar
Active Member

Posts

Joined
Wed Mar 09, 2011 5:19 am

Post by TAC » Fri Jun 06, 2014 4:20 am

You didn't Cleo ;)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by kabatza1 » Wed Jun 18, 2014 5:18 am

Sorry I dont know much about Macs exept from the fact that Macs used to be good machines but nowadays it is better to get a GNU/Linux PC.

Anyway try one of these
http://alternativeto.net/software/putty/?platform=mac

Another option would be to dump Plesk and use a free panel instead. I like zpanel from www.zpanelcp.com
a bit tricky to setup.... but it will let you install a ssl in each sup-store without having to do all this like you do when using Plesk.
here is my post:
http://forums.zpanelcp.com/Thread-It-is ... all-Zpanel

This was written really fast but i think it has everything you need

Newbie

Posts

Joined
Wed Jun 13, 2012 1:08 am

Post by cdamianou » Fri Aug 08, 2014 1:51 pm

Is there anyone that get this working on plesk? I am happy to pay of course.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by TAC » Fri Aug 15, 2014 10:56 pm

@cdamianou Did you find anyone to do this for you? I am still unable to do it myself :(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by cdamianou » Tue Aug 19, 2014 5:25 pm

@ Tac No I haven't. This is pretty frustrating cosidering this is a future that people will want to use.

Anyone out there?

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm

Post by TAC » Tue Aug 19, 2014 10:02 pm

Yeah, this is one of the OC awesome features I really want to use :)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by zbrz » Sat Jan 03, 2015 2:21 pm

Could someone please desribe to me what is the purpose of that PLESK? Its only about IP- so its related with SEO or what? Why you do that?

Newbie

Posts

Joined
Wed Nov 26, 2014 1:47 pm

Post by cdamianou » Sat Jan 03, 2015 4:53 pm

Has anyone actually managed to get this working in Plesk? I'm willing to pay anyone that knows how to do this.

http://www.magictao.co.uk


Active Member

Posts

Joined
Tue Aug 09, 2011 2:13 pm
Who is online

Users browsing this forum: No registered users and 16 guests