Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


ownCloud problems on nginx
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

ownCloud problems on nginx

MrOwenMrOwen Member
edited December 2012 in Help

I AM GOING TO PULL MY HAIR OUT.

Alright, I installed ownCloud on nginx using the MySQL install option. Install went fine, database was populated, and admin account was added successfully.

When I go to login, everything looks fine: http://i.imgur.com/u33Me.png
Aaaand, here's the result after I login: http://i.imgur.com/N0ctk.png

Snippets from nginx error log (includes downstream PHP fpm errors) from when I try to access /remote.php/core.css and /remote.php/core.js:

/remote.php/core.css

/remote.php/core.js

And here's my nginx config which is pretty much word for word from the ownCloud documentation: https://gist.github.com/fbc1ed56c30b1efdd0b1#file-config

I've tried asking for help in the ownCloud IRC but it's pretty dead over there and I imagine at least a few people have experience running ownCloud on nginx here. Oh, and I tried disabling CloudFlare service for the domain and still nothing. And all the permissions are good to go (all owned by www-data and chmod'd correctly).

And, yes, I know there's some semi-sensitive information here but I trust you guys :) It's only my domain name and my personal, dynamic home IP. Nothing too exciting... Oh, and I guess where I store my files. And the location of my PHP fpm server socket.

If you guys have any suggestions, I would love to hear them!

Moved code to gists. Seemed neater.

Comments

  • When I tried to run Owncloud on Nginx I had the same issue. I tried for a few days to get it working but eventually decided to just move on over to Apache. I know that there are people who have gotten it working and I'm interested to see how they have done it.

  • jarjar Patron Provider, Top Host, Veteran
    edited December 2012

    @wdq said: move on over to Apache

    This. OwnCloud is great, but save yourself a headache and use their recommended settings. It'll be worth it in the long term.

  • mikhomikho Member, Host Rep

    I also had this problem and it was solved by adding the php settings for https also.

    I cant get my config right now since I'm on my phone but it has to do eith the php config not being applied correct to the owncloud installation.

  • Never had any issues using owncloud with nginx/php-fpm. This is the config i'm using:

    https://gist.github.com/4409529

  • Do you have anything like this in your {http} config?

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; }

    In my case I tried that in my owncloud config and it gave me about that result you showed in the picture. Removing that fixed it. (Or anything that resembles this code.)

  • sampppasampppa Member
    edited December 2012

    Here is my http owncloud conf for nginx:

    server {
    listen 80;
    server_name domain;
    root /var/owncloud;
    index index.php;
    client_max_body_size 512M;
    # deny direct access
    location ~ ^/(data|config|.ht|db_structure.xml|README) {
    deny all;
    }
    # default try order
    location / {
    try_files $uri $uri/ @webdav;
    rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
    rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
    rewrite ^/apps/calendar/caldav.php /remote.php/caldav/ last;
    rewrite ^/apps/contacts/carddav.php /remote.php/carddav/ last;
    rewrite ^/apps/([^/])/(..(css|php))$ /index.php?app=$1&getfile=$2 last;
    rewrite ^/remote/(.*) /remote.php/$1 last;

    }
    # owncloud WebDAV
    location @webdav {
    fastcgi_split_path_info ^(.+.php)(/.*)$;
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.soc;
    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.soc;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS on;
    include fastcgi_params;
    }
    }

  • I'm about to gouge my eyes out of frustration right about now.

    @zhuanyi, I tried your tips/config and no go
    @happel, tried your config adapted for my install, still no go
    @YellowSloth, checked for that. I don't
    @sampppa, even with that extra rewrite stuff, it still doesn't work

    I'm getting these two errors every single time I access ownCloud: https://gist.github.com/f4924fcde930c9855529

    If I could just figure out why it can't open remote.php then I'll be out in the clear but until then, I will continue to burn with frustration.

  • Well if it can't find the file there is two possible reasons.

    -File is not where you said it is.
    -File permissions likely uploaded by root or something and you haven't given nginx permission to read it.

  • Try check disabled-function in php config file and make sure all functions are enabled, especially scan-dir and so on.

    Sorry for the typos, on cellphone now.

  • Not wanting to ruin the dreams but I got the same problem with Apache. I left everything default and it gives me this. Version 4.0 is working fine but 4.5 is screwing up. Direct install or updating 4.0 doesn't make a difference.

  • @Cirium: yup, everything is where it should be. I triple checked the paths
    @zhuanyi: no disabled functions in either php.ini or fpm override settings
    @taronyu: I'll try v4 but damnit, I want the latest and greatest!

    I've thought about those errors some more and I think nginx is looking in a folder called "remote.php" and inside of that is where it thinks core.css and core.js are but I haven't a clue how I would fix that.

    Thanks for all your help people! Perhaps in the future, this problem will be fixed but until then... SparkleShare, I suppose.

    But definitely, if you have any other suggestions or want any other debugging info about my environment, feel free to reply!

Sign In or Register to comment.