「Linux/nginx/php-symfony」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「==symfonyのnginx.confサンプル== server { listen 80; #default_server; server_name leaning-symfony2; #charset koi8-r; #access_log logs/host.ac...」) |
(→symfonyのnginx.confサンプル) |
||
行20: | 行20: | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | include fastcgi_params; | ||
+ | } | ||
+ | location ~ /\.ht { | ||
+ | deny all; | ||
} | } | ||
} | } |
2016年12月20日 (火) 18:45時点における最新版
symfonyのnginx.confサンプル
server { listen 80; #default_server; server_name leaning-symfony2; #charset koi8-r; #access_log logs/host.access.log main; # Load configuration files for the default server block. #include /etc/nginx/default.d/*.conf; root /var/www/php/leaning-symfony2/web; index app_dev.php; location / { if (!-e $request_filename) { rewrite ^/(.*)$ /app_dev.php?q=$1 last; } } location ~ \.php$ { root /var/www/php/leaning-symfony2/web; fastcgi_pass 127.0.0.1:9000; fastcgi_index app_dev.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } }