CentOS owncloud setup issues

Discussion in 'HOWTO-Related Questions' started by malak33, Aug 3, 2012.

  1. malak33

    malak33 New Member

    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...
     
  2. falko

    falko Super Moderator

    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?
     
  3. malak33

    malak33 New Member

    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
     
  4. falko

    falko Super Moderator

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

    Can you post your vhost configuration?
     
  5. malak33

    malak33 New Member

    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...
     
    Last edited: Aug 8, 2012
  6. falko

    falko Super Moderator

    I need the nginx configuration of your owncloud site.
     
  7. malak33

    malak33 New Member

    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.
     
    Last edited: Aug 9, 2012
  8. falko

    falko Super Moderator

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

    malak33 New Member

    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
     
  10. falko

    falko Super Moderator

    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;
    }
    }
     
  11. malak33

    malak33 New Member

  12. malak33

    malak33 New Member

    so going back and looking at what you had me change. I see that we just disabled SSL, any idea what it is that i could have done wrong setting it up? Again thanks for all the help you are the man!!!
     
  13. falko

    falko Super Moderator

    I'd recreate the SSL cert and just accept the default values. Chances are you entered something invalid and therefore created an invalid cert.
     

Share This Page