Debian 7, nginx
Пример конфигурации nginx на два сервера:
server {
listen 80;
server_name pma.example.com;
root /var/www/phpmyadmin/;
error_log /var/log/nginx/pma-err.log;
location / {
index index.php index.html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm-www.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name site.example.ru;
error_log /var/log/nginx/site.example.ru-err.log;
auth_basic "Frontend Security";
auth_basic_user_file ht/stie.example.ru.conf;
location / {
uwsgi_pass 127.0.0.1:49001;
include uwsgi_params;
}
location /media/ {
alias /var/www/django/code/site/media/;
expires 30d;
}
location /s/ {
alias /var/www/django/code/site/allstatic/;
expires 30d;
}
}