P2PFR.COM
https://forum.p2pfr.com/

Installer nginx & php5 sur debian wheezy
https://forum.p2pfr.com/viewtopic.php?f=18&t=23762
Page 1 sur 1

Auteur:  111110101011 [ 22 Août 2012 16:17 ]
Sujet du message:  Installer nginx & php5 sur debian wheezy

... quand même fou, il faut bien fouiller pour trouver, car:
- http://wiki.debian.org/Nginx ; cette page n'indique rien
- http://wiki.nginx.org/Install ; c'est autant relou par ici ...
- http://library.linode.com/web-servers/n ... -6-squeeze ; la même chose pour squeeze, et en trop compliqué ...
- http://www.isalo.org/wiki.debian-fr/index.php?title=Spécial%3ARecherche&search=nginx ; rien sur le wiki debian-fr

Donc un guide droit-au-but par ici:
http://rasberrypibeginnersguide.tumblr. ... ian-wheezy

Citer:
Nginx + PHP5 on Raspberry Pi (Debian Wheezy)

sudo apt-get install nginx php5-fpm php5-cgi php5-cli php5-common
sudo useradd www-data
sudo groupadd www-data
sudo usermod -g www-data www-data
sudo mkdir /var/www
sudo chmod 775 /var/www -R
sudo chown www-data:www-data /var/www
sudo vim /etc/nginx/sites-enabled/default

Comment the ipv6 line if you’re not using IPV6, adding a ‘#’ at the beginning of the line :

# listen [::]:80 default_server ipv6only=on;

Comment the line, adding a ‘#’ at the beginning of the line :

# root /usr/share/nginx/www;

& add the new one:

root /var/www;

Get an example file for a Silex Php Application here (gist) & paste it into /etc/nginx/sites-available/silex file (sudo vim…)

then create a symbolic link:

sudo ln -s /etc/nginx/sites-available/silex /etc/nginx/sites-enabled/silex

Edit /etc/php5/fpm/pool.d/www.conf & replace the line:

listen = /var/run/php5-fpm.sock

with:

listen = 127.0.0.1:9000

Then restart php-fpm & nginx :

sudo service php5-fpm restart
sudo service nginx restart

;-)


Copie de https://gist.github.com/3118699
Code:

    server {
            listen   80; ## listen for ipv4
            server_name  silex;

            access_log  /var/log/nginx/silex.access.log;
            error_log   /var/log/nginx/silex.error.log;

            root   /var/www/silex;

            location / {
                    root   /var/www/silex;
                    index  index.php index.html index.htm;
            }

            ## Parse all .php file in the /var/www/silex directory
            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(.*)$;
                    fastcgi_pass   127.0.0.1:9000;
                    fastcgi_index  index.php;
                    fastcgi_param  SCRIPT_FILENAME  /var/www/silex$fastcgi_script_name;
                    include fastcgi_params;
                    fastcgi_param  QUERY_STRING     $query_string;
                    fastcgi_param  REQUEST_METHOD   $request_method;
                    fastcgi_param  CONTENT_TYPE     $content_type;
                    fastcgi_param  CONTENT_LENGTH   $content_length;
                    fastcgi_intercept_errors        on;
                    fastcgi_ignore_client_abort     off;
                    fastcgi_connect_timeout 60;
                    fastcgi_send_timeout 180;
                    fastcgi_read_timeout 180;
                    fastcgi_buffer_size 128k;
                    fastcgi_buffers 4 256k;
                    fastcgi_busy_buffers_size 256k;
                    fastcgi_temp_file_write_size 256k;
            }

            ## Disable viewing .htaccess & .htpassword
            location ~ /\.ht {
                    deny  all;
            }
    }



J'ai testé, et pour le moment, ben ça marche pas ... :D

Auteur:  edmc73 [ 22 Août 2012 16:43 ]
Sujet du message:  Re: Installer nginx & php5 sur debian wheezy

tiens y'a le mot raspberry pi dans ton post ;) C'est pas plutot un tuto pour cette petit machine ?
Et sinon j'avais fait un autre post sur divers serveur web, à l'occaz, ton avis serait le bienvenue ;)

Auteur:  111110101011 [ 22 Août 2012 18:55 ]
Sujet du message:  Re: Installer nginx & php5 sur debian wheezy

Oui, j'avais repéré, mais comme c'est sous un dérivé Debian aussi ça aurait dû marcher ...
Je me souviens de ton topic, j'avais posté dessus je crois mais j'ai pas vraiment d'avis ..

Auteur:  111110101011 [ 08 Mai 2013 17:57 ]
Sujet du message:  Re: Installer nginx & php5 sur debian wheezy

Un aide mémoire Nginx:
http://e-loquens.fr/post/Aide-m%C3%A9moire-Nginx

Edit: je viens de voir que le fichier de conf de Nginx inclue déjà ce qu'il faut pour le lier comme il faut à php

Page 1 sur 1 Heures au format UTC + 1 heure [ Heure d’été ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/