Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user www-data;
- worker_processes 1;
- error_log /var/log/nginx/error.log;
- pid /var/run/nginx.pid;
- events {
- worker_connections 1024;
- # multi_accept on;
- }
- http {
- include /etc/nginx/mime.types;
- access_log /var/log/nginx/access.log;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- tcp_nodelay on;
- gzip on;
- gzip_disable "MSIE [1-6]\.(?!.*SV1)";
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
- # MOJE UPRAVY
- server {
- client_max_body_size 100m;
- listen 80;
- server_name 127.0.0.1;
- location /sendfile/ {
- internal;
- alias /var/www/nginx/sendfile/;
- }
- location / {
- root /var/www/nginx/;
- rewrite ^/(.*) /index.php last;
- }
- location ~ \.php$ {
- root /var/www/nginx;
- include /etc/nginx/fastcgi_params; #or whatever you named it
- fastcgi_pass 127.0.0.1:9000;
- }
- location /upload {
- # Pass altered request body to this location
- upload_pass /test;
- # Store files to this directory
- # The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should exist
- upload_store /tmp 1;
- # Allow uploaded files to be read only by user
- upload_store_access user:r;
- # Set specified fields in request body
- upload_set_form_field $upload_field_name.name "$upload_file_name";
- upload_set_form_field $upload_field_name.content_type "$upload_content_type";
- upload_set_form_field $upload_field_name.path "$upload_tmp_path";
- # Inform backend about hash and size of a file
- upload_aggregate_form_field "$upload_field_name.md5" "$upload_file_md5";
- upload_aggregate_form_field "$upload_field_name.size" "$upload_file_size";
- upload_pass_form_field "^submit$|^description$";
- upload_cleanup 400 404 499 500-505;
- }
- location /test {
- proxy_pass http://127.0.0.1:8080;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement