Skip to content

Commit

Permalink
Fixed nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
tenebrousedge committed Dec 30, 2012
1 parent 70de2d7 commit 659d259
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 38 deletions.
7 changes: 4 additions & 3 deletions en/installation/advanced-installation.rst
Expand Up @@ -221,18 +221,19 @@ you will need PHP running as a FastCGI instance.
# root directive should be global
root /var/www/example.com/public/app/webroot/;
index index.php;

access_log /var/www/example.com/log/access.log;
error_log /var/www/example.com/log/error.log;

location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}

location ~ \.php$ {
include /etc/nginx/fcgi.conf;
fastcgi_pass 127.0.0.1:10005;
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Expand Down
15 changes: 9 additions & 6 deletions es/installation/advanced-installation.rst
Expand Up @@ -302,19 +302,22 @@ nginx es un servidor web que está ganando mucha popularidad. Igual que Lighttpd
server {
listen 80;
server_name example.com;

# root directive should be global
root /var/www/example.com/public/app/webroot/;
index index.php;
access_log /var/www/example.com/log/access.log;
error_log /var/www/example.com/log/error.log;

location / {
root /var/www/example.com/public/app/webroot/;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}

location ~ .*\.php$ {
include /etc/nginx/fcgi.conf;
fastcgi_pass 127.0.0.1:10005;
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Expand Down
23 changes: 12 additions & 11 deletions fr/installation/advanced-installation.rst
Expand Up @@ -295,30 +295,31 @@ vous aurez besoin de PHP fonctionnant comme une instance FastCGI.

server {
listen 80;
server_name www.exemple.com;
rewrite ^(.*) http://exemple.com$1 permanent;
server_name www.example.com;
rewrite ^(.*) http://example.com$1 permanent;
}

server {
listen 80;
server_name exemple.com;
server_name example.com;
# root directive should be global
root /var/www/exemple.com/public/app/webroot/;

access_log /var/www/exemple.com/log/access.log;
error_log /var/www/exemple.com/log/error.log;
root /var/www/example.com/public/app/webroot/;
index index.php;
access_log /var/www/example.com/log/access.log;
error_log /var/www/example.com/log/error.log;

location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}

location ~ \.php$ {
include /etc/nginx/fcgi.conf;
fastcgi_pass 127.0.0.1:10005;
include /etc/nginx/fastcgi_params;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/exemple.com/public/app/webroot$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

Expand Down
9 changes: 5 additions & 4 deletions ja/installation/advanced-installation.rst
Expand Up @@ -184,18 +184,19 @@ nginxはポピュラーなサーバーで、少ないシステムリソースで
# root directive should be global
root /var/www/example.com/public/app/webroot/;

index index.php;
access_log /var/www/example.com/log/access.log;
error_log /var/www/example.com/log/error.log;

location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}

location ~ \.php$ {
include /etc/nginx/fcgi.conf;
fastcgi_pass 127.0.0.1:10005;
include /etc/nginx/fastcgi_params;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Expand Down
25 changes: 11 additions & 14 deletions pt/installation/advanced-installation.rst
Expand Up @@ -269,30 +269,27 @@ mas no mínimo, você irá precisar do PHP sendo executado como FastCGI.
server {
listen 80;
server_name example.com;

# root directive should be global
root /var/www/example.com/public/app/webroot/;
index index.php;
access_log /var/www/example.com/log/access.log;
error_log /var/www/example.com/log/error.log;

location / {
root /var/www/example.com/public/app/webroot/;
index index.php index.html index.htm;
if (-f $request_filename) {
break;
}
if (-d $request_filename) {
break;
}
rewrite ^(.+)$ /index.php?q=$1 last;
try_files $uri $uri/ /index.php?$uri&$args;
}

location ~ .*\.php[345]?$ {
include /etc/nginx/fcgi.conf;
fastcgi_pass 127.0.0.1:10005;
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

URL Rewrites no IIS7 (Windows hosts)
====================================

Expand Down

0 comments on commit 659d259

Please sign in to comment.