Ubuntu 12.04 x64, DigitalOcean.
Поставил nginx+Apache+PHP,статика не отдается воообще, вместо любых урлов значение proxy_pass. Настраивал по
этому гайду.
/etc/nginx/nginx.conf
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
error_log /home/project/logs/nginx.error.log;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
gzip_proxied any;
gzip_comp_level 7; #Level Compress
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascri$
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
/etc/nginx/sites-enabled/project.ru
upstream project {
server 127.0.0.1:81;
}
server {
listen 80;
error_page 404 /404.html;
error_page 403 /403.html;
server_name project.ru www.project.ru;
access_log /home/project/logs/nginx.access.log;
error_log /home/project/logs/nginx.error.log;
location / {
proxy_pass http://project;
}
location ~* .(jpg|jpeg|gif|png|ico|css|bmp|swf|js|mov|avi|mp4|mpeg4) {
root /home/project/www;
}
location ~ /.ht {
deny all;
}
}