Drupal 6 Hosting With nginx And PHP-FastCGI. Part 4




Drupal-Man

.

.

.

.

.

Затем, мы создаем конфигурацию nginx для нашего сайта.

nano /etc/nginx/sites-available/www.example.com

server {

listen   80;

#   server_name _   # catch-all

server_name example.com www.example.com;

access_log /srv/www/www.example.com/logs/access.log;

error_log /srv/www/www.example.com/logs/error.log;

root   /srv/www/www.example.com/public_html;

index  index.php;

location / {

if (!-e $request_filename) {

rewrite ^/(.*)$ /index.php?q=$1 last;

}

}

# serve static files directly

location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {

rewrite ^/favicon.ico$ /sites/default/themes/mytheme/favicon.ico break;

access_log        off;

expires           30d;

}

# If you use the Imagecache module, you’ll need to update the location and enable this directive

#location ^~ /sites/default/files/imagecache/ {

#    index  index.php index.html;

#    # assume a clean URL is requested, and rewrite to index.php

#    if (!-e $request_filename) {

#        rewrite  ^/(.*)$  /index.php?q=$1  last;

#        break;

#    }

#}

location ~ \.php$ {

include /etc/nginx/fastcgi_params;

fastcgi_pass  127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param  SCRIPT_FILENAME  /srv/www/www.example.com/public_html$fastcgi_script_name;

}

}

Потом, мы ее задействуем:

cd /etc/nginx/sites-enabled/

ln -s /etc/nginx/sites-available/www.example.com

И давайте перезагрузим nginx.

service nginx restart

Popularity: 2%



Этот материал находится на сайте http://compiling.ru
__________________________________________



Похожие посты:


  • Nginx Catch-All Host As Front End 3, Configure Nginx
  • Установка PHP 5.3, Nginx и PHP-fpm на Ubuntu/Debian
  • Drupal 6 Hosting With nginx And PHP-FastCGI. Part 5
  • Drupal 6 Hosting With nginx And PHP-FastCGI. Part 3
  • Nginx Catch-All Host As Front End 2, Configure Apache



  • Опубликовано 09 Апр 2010 в 14:09. В рубриках: Solutions. Вы можете следить за ответами к этой записи через RSS 2.0. Вы можете оставить отзыв или трекбек со своего сайта.

    Оставьте свой отзыв

    Партнёры:


    www.vpnssl.ru

    Создание vpn подключения - от 1'950р.

    Есть вопрос! Оставь свой голос!

    Question:

    Что нужно админу для счастья?

    View Results

    Loading ... Loading ...




    Most Popular Posts



    Supported:

  • Металлоконструкции на заказ: лестничное ограждение нержавеющая сталь.
  • поисковая оптимизация сайта вопросы .


  • free counters