Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD & nginx
Я человек сильно не просвещенный в
вашем сленге и особо ничего не понял.
Но, судя по всему их и не должно быть на
freebsd? Я просто че переживаю, так как на
debian они у меня были...
Тогда вопрос другой, это все вставить в
nginx.conf ?
[code]
### drupal-cgm file follows:
# --- cut here ---
# nginx - /etc/nginx/sites-available/drupal-cgm
#
server {
listen 80 default;
server_name _; # non defined server
return 444; # silently drop request
}
server {
listen clinica.0:80;
server_name www.clinica.0;
rewrite ^(.*) http://clinica.0$1 permanent;
}
server {
listen clinica.0:80;
server_name clinica.0;
access_log /var/log/nginx/drupal-cgm.access.log;
error_log /var/log/nginx/drupal-cgm.error.log;
root /var/www/drupal-cgm;
# restrict request methods to: GET|HEAD|POST
if ( $request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
break;
}
# hide drupal system files
location ~*
((cron\.php|settings\.php)|\.(htaccess|engine|inc|info|install|module|profile|pl|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(Entries.*|Repository|Root|Tag|Template))$
{
deny all;
}
# # rewrite domain name without the leading www.
# if ($host ~* ^www\.(.*)) {
# set $host_without_www $1;
# # bellow $1 contains '/foo', not 'www.mydomain.com/foo'
# rewrite ^(.*)$ http://$host_without_www$1 permanent;
# }
location / {
index index.php index.html;
try_files $uri $uri/ @drupal;
}
location @drupal {
# clean url rewrite for Drupal
rewrite ^/(.*)$ /index.php?q=$1 last;
#rewrite ^/(\w*)/(.*)$ /$1/index.php?q=$2 last;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/tmp/php-fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
# --- cut here ---
[/code]
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,152630,152635#msg-152635
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|