[Owncloud] nginx configuration

Michael Grosser owncloud at seetheprogress.net
Wed Nov 28 18:18:14 UTC 2012


Just went over the mail and I would say it could work when using root
/usr/share instead of /usr/share/owncloud
Just an idea, hadn't had a lot of time.

Cheers Michael


On Wed, Nov 28, 2012 at 6:45 PM, Diederik de Haas <didi.debian at cknow.org>wrote:

> Hi,
>
> I want to make owncloud run under nginx (with php-fpm) and to test things
> out
> I've created a vm (hostname=ocdeb-mysql-nginx) and installed the required
> software and placed owncloud's files under /usr/share/owncloud/.
> I've created /etc/nginx/conf.d/owncloud.conf with the contents pasted
> below.
>
> I want to make owncloud available under http://<hostname>/owncloud/, but
> so far
> I've only managed to get it to work under http://<hostname>/.
> With apache I can just say "Alias /owncloud /usr/share/owncloud", but how
> to do
> that with nginx?
>
> Thanks in advance,
>   Diederik
>
>
> owncloud.conf:
> ==============================
> server {
>         listen 80;
>         server_name ocdeb-mysql-nginx;
>         root /usr/share/owncloud;
>         index index.php;
>
>         # deny direct access
>         location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
>                 deny all;
>         }
>
>         # default try order
>         location / {
>                 try_files $uri $uri/ @webdav;
>         }
>
>         # owncloud WebDAV
>         location @webdav {
>                 fastcgi_split_path_info ^(.+\.php)(/.*)$;
>                 fastcgi_pass unix:/var/run/php5-fpm.sock;
>                 fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
>                 include fastcgi_params;
>         }
>
>         # enable php
>         location ~ \.php$ {
>                 fastcgi_pass unix:/var/run/php5-fpm.sock;
>                 fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
>                 include fastcgi_params;
>         }
> }
> ==============================
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20121128/4db3d3bf/attachment.html>


More information about the Owncloud mailing list