View Single Post
  #9  
Old 10th August 2012, 03:03
malak33 malak33 is offline
Junior Member
 
Join Date: Aug 2012
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

here is /etc/gninx/nginx.conf

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;

events {
worker_connections 1024
}

http {
include /etc/nginx/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 /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

#loadconfig files from the /etc/nginx/conf.d directory
#The default server is in conf.d/default.conf
inclue /etc/nginx/conf.d/*.conf/

}


here is the /etc/nginx/conf.d/owncloud.conf

#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;
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;
}
}

that is both of the files; thanks for the help
Reply With Quote