NgInx: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 7: Zeile 7:


= Konfiguration =
= Konfiguration =
<pre>server {
        listen 80;
        server_name emex;
        root /home/www/emex;
        index index.php index.html;
        location /home/www/emex {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }
}
</pre>

Version vom 11. Juli 2015, 20:45 Uhr


Installation

apt-get install php5-cli php5-fpm nginx-full mariadb-server mariadb-client

Konfiguration

server {
        listen 80;
        server_name emex;
        root /home/www/emex;
        index index.php index.html;
        location /home/www/emex {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }
}