user nobody;
worker_processes 2;
error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events { worker_connections 1024; multi_accept on; use epoll; }
http { include mime.types; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#tcp_nodelay on;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 5;
send_timeout 10;
# HTTPS server
#
server {
#listen 443 ssl spdy;
#listen [::]:443 ssl spdy;
listen 443 ssl;
#listen [::]:443 ssl;
server_name localhost;
access_log off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_certificate /etc/ssl/certs/bundle.crt;
ssl_certificate_key /etc/ssl/private/_tasteshop_co_kr.pem;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/ssl/certs/AddTrustExternalCARoot.crt;
resolver 8.8.8.8 8.8.4.4;
location = /favicon.ico {
log_not_found off;
}
location ~ /\.ht {
deny all;
}
location / {
root /var/www/img;
}
location ^~ /upload {
root /var/www/img_server;
#try_files $uri $uri/ @rewrite;
rewrite ^/(.*)$ /index.php?_url=/$1 break;
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param REQUEST_URI $uri?$args;
include fastcgi_params;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_min_length 1000;
gzip_disable "MSIE [1-6]\."
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
client_max_body_size 10m;
}
}
}
this is my nginx.conf(nginx + php-fpm + phalcon => for img server(static file(img file) with image uploading)).
but i got this errmsg 'That route was not found on the server.'
[folder structure]
/var/www/img => collection of img files
/var/www/img_server => phalcon upload module root (/var/www/img_server/index.php)
What's wrong?