php5-fpm pools (shared-hosting model)
Is it possible to determine/create php pools for each site? I would like to run every site with custom users and groups and not all with www-data
like: ee site create mysite.com --wp --umyuserr:gmygroup
Then ee create the php-fpm .conf file and the user:group.
I'm doing this manually every time.
Hi @liquidia,
- yes
- most likely
- not yet
- yes
I get hundreds of malicious attempts all the time. Various IP addresses always trying to log in to WP or connect via SSH, etc. I run nightly backups, etc. The only way I can see the hack getting in is through WP.
So what about this option? Is it ready yet?
Please make easyengine a real shared hosting option!
after 2 years of this issue being open I really doubt EE will make this happen. For now i'll do my own script and if it's okay to be consumed by the public, i'll publish it in my github
Hi @AcidRaZor - I wrote my own script for this as well but I haven't shared it yet because it is specific for the stack I'm on. I'd love to combine forces and see if we can come up with something - maybe write a plugin as well since that is a new feature for EE.
The thing is, right now if I set up multiple php pools, I'm not sure if it will work with redis or fast-cgi cache - the way EE is set up. I haven't had time to look into it further as I've been preoccupied with other things.
I would like to join and help too... Right now My changes to it are inconsistent with EE scripts so when an update is run, I need to change it again... and this is not something I like
I prefer not to base anything off of EE in case there are security issues. Reckon when/if I'm ready to release something, I'll let you guys know and we can collaborate further. Software often gets bloated by unnecessary stuff which opens up a can of worms when security is concerned. A lot of people may be using EE to add websites easier and there is function for this, but in my opinion all of the sites that have been setup by this software are subject to a hack taking down and making vulnerable everything on the server since the creators doesn't think it's worth their time to add this feature and suggest chrooted sftp when they have no clue that a vulnerability in PHP can affect all sites hosted on a server
Well.... Just your luck... pagespeed security issue and there is no way to update EE... :(
Has a #poll been taken on this issue yet? In lieu of adding any new tools or features, I believe we should address this first.
I've been a fan of EE since almost day 1 but this has been a growing concern of mine and now I basically have to host each site on a separate vm, which defeats the end purpose of EE.
Please make this a top priority, even if it requires a paid version to help offset dev costs - if that has been the reason it is on the back burner. I'm personally willing to pay up to $10 USD per server for a secure CLI version of EE, and more for an advanced version with an admin/client web interface.
Thank you in advance.
On Thu, Apr 7, 2016 at 1:54 AM, Alex Frenkel [email protected] wrote:
Well.... Just your luck... pagespeed security issue and there is no way to update EE... :(
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/EasyEngine/easyengine/issues/150#issuecomment-206722183
Same here. If this is a feature that will only be added as a 'premium' addition, I would happily pay for it.
On Thu, Apr 7, 2016 at 9:41 AM, Matt [email protected] wrote:
Has a #poll been taken on this issue yet? In lieu of adding any new tools or features, I believe we should address this first.
I've been a fan of EE since almost day 1 but this has been a growing concern of mine and now I basically have to host each site on a separate vm, which defeats the end purpose of EE.
Please make this a top priority, even if it requires a paid version to help offset dev costs - if that has been the reason it is on the back burner. I'm personally willing to pay up to $10 USD per server for a secure CLI version of EE, and more for an advanced version with an admin/client web interface.
Thank you in advance.
On Thu, Apr 7, 2016 at 1:54 AM, Alex Frenkel [email protected] wrote:
Well.... Just your luck... pagespeed security issue and there is no way to update EE... :(
— You are receiving this because you commented. Reply to this email directly or view it on GitHub < https://github.com/EasyEngine/easyengine/issues/150#issuecomment-206722183
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/EasyEngine/easyengine/issues/150#issuecomment-206935973
+1 If this is a feature that will only be added as a 'premium' addition, I would happily pay for it.
I’ve been hoping for pools since the start of EE. I have many servers and setup the sites on pools most times or separate servers. In my opinion server security is not a one script fix since there are many situations where security needs to differ per server. But pools are a must have. Hopefully @rahul286 or @MiteshShah can chime in.
aronwp
Another advantage of running separate PHP Pools is that you can see which site/pool has been using CPU time. Right now all I see is one pool 'www-data' and I don't know which site is the resource hog: screenshot http://d.pr/i/1gSeE.
On another server where I DID set up separate PHP pools manually, I can see the separation. Screenshot: http://d.pr/i/11RpB.
edit: I updated the screenshots with text explaining what it is. Also fixed a typo.
Apparently EasyEngine is left behind. Just create a user, a php pool manually and assign them to the nginx website conf.
For those who want a manual solution:
https://www.digitalocean.com/community/tutorials/how-to-host-multiple-websites-securely-with-nginx-and-php-fpm-on-ubuntu-14-04
Can somebody please post a how-to? I'd like to run with EasyEngine and give clients full admin access to individual WordPress installs on subdomains ( e.g. user1.mysite.com, user2.mysite.com, etc..)
As we know a WordPress admin can upload PHP code in many different ways ( themes, plugins, template editor, etc.. ) and if they're all running as www-data then it would be very easy for one user to access the database details in wp-config.php of another site (along with other things like overwriting files via PHP).
I'd like to have each subdomain run as a different user, as discussed in this thread.
Has anybody automated this? Is there an nginx template or something in EasyEngine where I can change some template config values and it will apply to all new sites I create?
Is the article @andremacola mentioned last year still relevant?
Or should I be looking at something like CloudLinux?
Here's a proof of concept I build earlier, forgot to share it, https://github.com/avistu/shared_engine This is a custom script just showing how its possible to add the support for multiple users, use at your own risk. There are certain other changes I've made to the server where I've implemented this, like default file and directory permissions changed to 650 and 750 respectively. The structure I've used is much similar to what WHM uses.
Working project thats implementing this is AnsiPress which is being developed by @MiteshShah could be a good thing to try it out guys.
@gagan0123 Thanks for your project
At AnsiPress we does not use shared PHP process to avoid security issue.
Instead of this we create per user separate PHP master process. service php7.1-mitesh restart service php7.1-gagan restart
Where mitesh & gagan is username
We allocate each user a separate php master process and pool number.
@gagan0123 I'd first tested similar solution which you developed but using that solution
mitesh can upload custom php files which can be read the gagan user wp-config.php file easily.
Refer - https://github.com/AnsiPress/AnsiPress/issues/24
@gagan0123 and @MiteshShah by any chance - have you explored Docker-based or some container-level isolation for shared hosting needs?
We haven't reached the final stage of our research yet but Docker seems to handle these problems gracefully. But as you may be already aware, we as a company do not have shared hosting use-case. We are experimenting with Docker to "bundle" a single site as a different entity. Removing the need to install nginx/php/mysql on host machine altogether and make sites more portable.
@mbtamuli has more details about Docker-based setup.
@rahul286 Nope I'm not used Docker much :(
@mbtamuli @rahul286 I guess You can check AnsiPress Shared Hosting code and implement it on Docker easily.
FYI - I'll mostly online on https://ansipress.slack.com, So if you had any issue or need any help ping me on AnsiPress slack. Slack invite - http://ansipress.herokuapp.com/