Zend Server SuExec or Equivalent

General discussion forum for the Zend Server

Zend Server SuExec or Equivalent

Postby gary9162 on Mon Jul 31, 2017 5:13 pm

I am primarily running Magento2 and I am migrating some sites to ZendServer for simplified development.

In the process I am finding some difficulties with the way Zend Server is setup out of the box when running multiple virtual hosts on one site.

Magento 2[and to a large extent Magento1] is very fiddly when it comes to the userid/group everything will run under. There are a large number of cron jobs which must run under the same userid/group that the website PHP processes will run under. Various bits of code end up setting restrictive permissions on files which you will then need to be executing as the user which created those files in order to make updates. File level caching, log files, etc. In addition, Magento2 takes this a step further in that many media files[images, javascript, css] are created from running a command line build/deploy script - which then will make it so those files cannot be accessed by the web server if the web server does not run as the same user.

The general setup which seems to work best is to have an SSH logon, example for website www gamort com the logon is gamort. From that logon, you can edit files directly, make adjustments, etc. Cronjobs are run from this user, so file ownership will be gamort:gamort and depending on the flavor of the week, file permissions for generated files will either be 600 or 660.

This means that the web server itself should swap to running as gamort:gamort for access to the virtual host.

And lastly PHP should also run as gamort:gamort


For ease of configuration, it is easiest to place those files directly in the home directory for the user. The layout I like best is along the lines of: /home/gamort/gamort_com/html

So far this runs into a number of issues with Zend Server:
When defining virtual hosts, it like to default to placing them in the directory /usr/local/zend/var/apps/http/, so my site would be /usr/local/zend/var/apps/http/gamort_com/...
Apache suexec was defined to run under /var/www only


I can't find good documentation on all the configuration files specific to Zend Server. Does anyone have a standard config they use for using Zend Server as a "drop in" replacement for a typical Apache/PHP-FPM system? I understand I will lose some of the power of Zend Server - but the goal here is to have a minimal learning curve for new developers while providing ZRay and a limited set of new features - rather then try to port everything to run the way Zend Server defaults to.
gary9162
 
Posts: 1
Joined: Mon Jul 31, 2017 4:58 pm

Re: Zend Server SuExec or Equivalent

Postby MickeyZend on Tue Aug 01, 2017 2:09 pm

Hi,

Not a trivial answer here.
Please can you open a support ticket via our web-site.

Thanks!
Mickey.
User avatar
MickeyZend
Zend Product Manager
 
Posts: 85
Joined: Mon Aug 19, 2013 1:34 pm
Location: Israel


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 3 guests