Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

systemd/php-fpm#153

Closed
MarcWeber wants to merge 2 commits intoNixOS:masterfrom
MarcWeber:submit/php-fpm
Closed

systemd/php-fpm#153
MarcWeber wants to merge 2 commits intoNixOS:masterfrom
MarcWeber:submit/php-fpm

Conversation

@MarcWeber
Copy link
Contributor

some changes to PHP: (the pull request for nixpkgs will be given in a comment)

  • id tag
  • system_fpm_config
  • requires recent nix hashString implementation (everybody should have it now ?)

More information see comments in phpfpm.nix

@MarcWeber
Copy link
Contributor Author

belongs to nixpkgs pull request: NixOS/nixpkgs#487

@rbvermaa
Copy link
Member

hashString was only introduced in Nix 1.4. I don't think we should use such new feature in nix in nixpkgs. Currently nix 1.2 is required for nixpkgs, and when we switched, that caused quite some annoyances to some users. I think we should be a bit conservative with the nix version required for nixpkgs, so I would prefer not needed nix > 1.2 for nixpkgs currently. Can this be pull request be made to work with nix <= 1.2 as well somehow (e.g. alternative to hashString).

Edit: I guess it should be fine for nixos (to which this changeset refers to, sorry still early)

@edolstra
Copy link
Member

Some of the description strings have improper punctuation / formatting (descriptions are DocBook fragments, so they should use DocBook markup).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary.

some changes to PHP: (the pull request for nixpkgs will be given in a comment)
- id tag
- system_fpm_config
- requires recent nix hashString implementation (everybody should have it now ?)
- include improvements suggesteb by Eelco

More information see comments in phpfpm.nix
@offlinehacker
Copy link
Contributor

+1 hosting wordpress it is :D

@offlinehacker
Copy link
Contributor

So, what's the status with merging this in?

@offlinehacker
Copy link
Contributor

So what is the state with merging this? I would really like to add some PHP packages like wordpress and serve then with this great PHP process manager.

@MarcWeber
Copy link
Contributor Author

Excerpts from Jaka Hudoklin's message of Wed Aug 21 11:51:50 +0200 2013:

So what is the state with merging this? I would really like to add
some PHP packages like wordpress and serve then with this great PHP
process manager.
state is: It works. at github.com/MarcWeber/nixos,nixpkgs you'll find
git branches you can follow

@offlinehacker
Copy link
Contributor

Well yes, but it would be nice to have this in official nixos repo :)

@domenkozar
Copy link
Member

Someone needs to test it with full setup and confirm it's handy :-)

@offlinehacker
Copy link
Contributor

Will do that. But it does cover most of the things that @brodul once explained how secure wordpress deployments shuld be made :D

But yes, code really needs some refactoring to be more clean and readable.

@brodul
Copy link
Contributor

brodul commented Aug 21, 2013

Next week beer?

How is the status with the wiki? So we can write some cookbooks/examples.

@Phreedom
Copy link
Member

Can someone provide a config I can test in a vm for all this php stuff? I'll be glad to work on merging this.

@MarcWeber
Copy link
Contributor Author

One sample is contained in the patch, another can be found here:

If I didn't miss anything this creates users and PHP config at once.
Its using an indiividual group for each account.
You still have to create public_html and make it group accessible.

second example:

require = [·
   ./php-hosts.nix
];

services.phphosts = [
  { user = "user1"; domains = ["user1.localhost"]; php = pkgs.php5_3fpm; }

  { user = "php52_dont_use";
    domains = ["php52.mawercer.de"];
    php = pkgs.php5_2fpm;·
    documentRoot = "/home/user1/public_html/dir";
    # must be the same for all php52 versions because there is only one /etc/php52-something config
    phpIniLines = ''
        # traum-wohnung-quiz_de
        post_max_size= 20M
        upload_max_filesize= 20M
        max_execution_time= 1200
        max_input_time= 1200
        memory_limit= 512M
        sendmail_path = /does-not-exist
    '';
  }

  { user = "xdebugtest"; group = "fv1";
    domains = ["xdebugtest.localhost"];
    php = pkgs.php5_4fpm;
    xdebug = { enable = true; port = "9000"; };
    phpIniLines = ''
        short_open_tag = on
        variables_order = "EGPCS"
        xdebug.trace_output_dir /tmp/xdebugtrace
        xdebug.auto_trace On
        html_errors Off
    '';
  }

]

and put http://mawercer.de/tmp/php-hosts.nix into /etc/nixos

@MarcWeber
Copy link
Contributor Author

Now included in: NixOS/nixpkgs#487

@MarcWeber MarcWeber closed this Oct 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants