Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443 ssl;
- server_name ***;
- include /etc/nginx/ssl.conf;
- root /var/www;
- index index.php;
- client_max_body_size 3048M; # set maximum upload size
- set_real_ip_from 10.0.64.254;
- real_ip_header X-Real-IP;
- # deny direct access
- location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
- deny all;
- }
- # static
- location ~*^.+\.(jpg|jpeg|gif|png|zip|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|mp3|avi)$ {
- root /var/www;
- }
- # default try order
- location / {
- try_files $uri $uri/ @webdav;
- }
- # owncloud WebDAV
- location @webdav {
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_pass unix://tmp/wwwpool.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS on;
- include fastcgi_params;
- }
- # enable php
- location ~ \.php$ {
- fastcgi_pass unix:/tmp/wwwpool.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS on;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment