HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   CentOS owncloud setup issues (http://www.howtoforge.com/forums/showthread.php?t=58169)

malak33 3rd August 2012 10:37

CentOS owncloud setup issues
 
m trying to setup owncloud on a virtualbox. I am using the tutorial on http://www.howtoforge.com/your-cloud...-on-centos-6.2

i have gotten to the end of the tutorial and when i try to get to the webpage using elinks the error i get says "Unable to retrieve https://owncloud.example.com/: SSL error

i would appreciate any help at all if you need any more information or any have questions let me know.

i have even deleted all the certs and gone through that section of the walkthrough again. No luck...

falko 4th August 2012 10:44

Are there any errors in the nginx error log?

Can you disable SSL and let the ownCloud vhost listen on port 80? Does it work then?

malak33 4th August 2012 18:23

i was having trouble getting the nginx error log to my host machine. So i just screen shot it and hosted it on imgur here http://imgur.com/gVMIX

also i'm still pretty green if you could tell me how to switch the owncloud vhost to listen to port 80 instead i would be happy to try that out. along with disabling SSL.

Thanks again

falko 5th August 2012 19:51

It seems as if the owncloud directory /usr/share/nginx/html/owncloud does not exist.

Quote:

also i'm still pretty green if you could tell me how to switch the owncloud vhost to listen to port 80 instead i would be happy to try that out. along with disabling SSL.
Can you post your vhost configuration?

malak33 8th August 2012 03:26

something tells me that this is wrong. but here is the config i have in /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#this is for owncloud
192.168.1.100 owncloud.example.com

also if i turn off iptables and navigate to
http://localhost/
the nginx default webpage loads
not sure if that helps at all.

if that is not the file you are talking about let me know...

falko 8th August 2012 14:07

Quote:

Originally Posted by malak33 (Post 283387)
if that is not the file you are talking about let me know...

I need the nginx configuration of your owncloud site.

malak33 9th August 2012 05:01

so you mean the file you need is
/etc/nginx/nginx.conf
correct?
or do you want /etc/nginx/conf.d/owncloud.conf???

I'm guessing you want the first one?
correct?
here is the url for the image gallery
http://imgur.com/a/9Wglz

i also moved all the .conf's in the /etc/nginx/conf.d/ directory to a backup directory i made
i kept owncloud.conf and restarted nginx
still the same error

also i did not make the directory /usr/share/nginx/html/owncloud
am i supposed to?
thanks again.

falko 9th August 2012 15:09

Quote:

Originally Posted by malak33 (Post 283459)
so you mean the file you need is
/etc/nginx/nginx.conf
correct?
or do you want /etc/nginx/conf.d/owncloud.conf???

Can you post the contents of both files here (as text, not images)?

malak33 10th August 2012 02:03

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

falko 10th August 2012 12:40

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



All times are GMT +2. The time now is 21:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.