View Single Post
  #10  
Old 10th August 2012, 12:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Modify /etc/nginx/conf.d/owncloud.conf as follows and reload nginx:
Code:
#redirect http to https.
#server {
#listen 80;
#server_name owncloud.example.com;
#rewrite ^ https://$server_name$request_url? permanent; #enforce https
#}
#owncloud (ssl/tls)
server {
#listen 443 ssl;
#ssl_certificate /etc/nginx/certs/server.crt;
#ssl_certificate_key /etc/nginx/certs/server.key;
listen 80;

server_name owncloud.example.com;
root /var/www/owncloud;
index index.php;
client_max_body_size 64M; #set maximum upload size
#deny direct access
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
#default try order
location / {
try_files $uri $url/ @webdav;
}
#owncloud WEBDAV
location @webdav {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock'
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
#enable php
location ~\.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
}
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote