seiffert / symfony-vagrant

This is a project template which enables you to get Symfony2 projects up and running on a Vagrant VM really quickly.
45 stars 10 forks source link

php-fpm missing #4

Closed Stubbs closed 11 years ago

Stubbs commented 11 years ago

I've tried using your template with a Debian 6.0.6 & Ubuntu Lucid VM and neither can install php-fpm any more.

seiffert commented 11 years ago

Are there any error messages you could provide? What does "neither can install php-fpm" mean? Please include some log messages so I can try to resolve this problem as soon as possible.

Cheers, Paul

Stubbs commented 11 years ago

php5-fpm isn't available in the version of Debian I'm trying to use. My bad.

Stubbs commented 11 years ago

Actually, I'm going to re-open this so I can submit a pull request.

I've added a use_fpm variable to the Personalization file & changed the PHP module.

How do I create a symphony project using my fork of the project to test it?

seiffert commented 11 years ago

I haven't tried it, but this should be possible by passing a --repository-url option to composer create-project. See the docs for more information.

Thanks for contributing! I'd love to have some flexibilities in this package!

Stubbs commented 11 years ago

I tried the repository option, but that's looking for a whole repository :-)

I've never used or configured nginx before, without the fpm module for PHP, what would app.dev.conf look like?

To my novice eyes it looks like the final location section might need to change?

location ~ ^/(app|app_dev)\.php(/|$) {
        fastcgi_pass    unix:/run/shm/<%= @vhost %>.phpfpm.socket;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
seiffert commented 11 years ago

What do you want nginx to do? Just deliver static content? I haven't used nginx with PHP not using php-fpm... maybe it would be better to have the webserver (nginx/apache2) configurable with a variable in Personalization, what do you think?

Stubbs commented 11 years ago

I'm trying to get nginx to serve my PHP project as that's what came as default with your template, but as I mentioned on the other issue Apache is being installed as a dependency for something and getting in the way of nginx.

The way I've tackled it on my particular project I'm working on has been to use the $::osfamily variable, and if it's Debian (and probably Ubuntu) add the dotdeb repo & install the PHP modules from that, combine that with the patch to stop Apache running and I've got a

It's not working 100% yet, but when it is I'll send you a patch to try.

Having the option to use Apache or NGinx would also be good.

seiffert commented 11 years ago

Yeah, it would be great if users could choose which webserver to use. However, it's unlikely that I'm going to integrate that into this repository very soon by myself. I am working on a slightly different approach which will make the configuration of the virtual machines much easier, but this isn't near to completed yet.

Still, I find it strange that apache2 is installed as a dependency of some other package. Do you know which one it is? Could you just push your changes to github? Even if it's not working yet... we can still squash your commits afterwards.

seiffert commented 11 years ago

This has been implemented in the current version, see #7