{"id":109,"date":"2014-03-12T11:34:27","date_gmt":"2014-03-12T16:34:27","guid":{"rendered":"http:\/\/etapien.com\/guides\/?p=109"},"modified":"2020-08-24T14:22:37","modified_gmt":"2020-08-24T19:22:37","slug":"how-to-install-owncloud-on-debian-7-with-nginx","status":"publish","type":"post","link":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/","title":{"rendered":"How to Install ownCloud on Debian 7 with Nginx"},"content":{"rendered":"<p>This tutorial is to show you how to install ownCloud on Debian 7 using Nginx and PHP5-FPM.<\/p>\n<p>In order for this to work correctly you will need to follow these instructions.<\/p>\n<p>Please run the following commands:<\/p>\n<ul>\n<li>apt-get update<\/li>\n<li>dpkg-reconfigure locales (We recommend using en_US.UTF-8 UTF.8)<\/li>\n<li>apt-get upgrade<\/li>\n<li>apt-get install nano<\/li>\n<\/ul>\n<p>nano \/etc\/apt\/sources.list \u2013 Add the following<\/p>\n<blockquote><p>deb http:\/\/packages.dotdeb.org wheezy all<\/p>\n<p>deb-src http:\/\/packages.dotdeb.org wheezy all<\/p><\/blockquote>\n<ul>\n<li>wget http:\/\/www.dotdeb.org\/dotdeb.gpg<\/li>\n<li>apt-key add dotdeb.gpg<\/li>\n<li>apt-get update<\/li>\n<li>apt-get install nginx php5 php5-fpm php5-gd php5-mysql mysql-server<\/li>\n<\/ul>\n<p>When it installs MySQL it will ask you to make a password, you need to remember this.<\/p>\n<ul>\n<li>mysql \u2013u root \u2013p (Enter password you made above when asked)<\/li>\n<li>create database owncloud;<\/li>\n<li>exit;<\/li>\n<li>rm \/etc\/nginx\/sites-available\/default<\/li>\n<li>nano \/etc\/nginx\/sites-available\/default<\/li>\n<\/ul>\n<p>Enter this config and change sub.domain.tld to your domain.<\/p>\n<blockquote><p>server {<br \/>\nlisten 80;<br \/>\nserver_name sub.domain.tld;<\/p>\n<p># Path to the root of your installation<br \/>\nroot \/var\/www\/owncloud;<\/p>\n<p>client_max_body_size 10G; # set max upload size<br \/>\nfastcgi_buffers 64 4K;<\/p>\n<p>rewrite ^\/caldav(.*)$ \/remote.php\/caldav$1 redirect;<br \/>\nrewrite ^\/carddav(.*)$ \/remote.php\/carddav$1 redirect;<br \/>\nrewrite ^\/webdav(.*)$ \/remote.php\/webdav$1 redirect;<\/p>\n<p>index index.php;<br \/>\nerror_page 403 \/core\/templates\/403.php;<br \/>\nerror_page 404 \/core\/templates\/404.php;<\/p>\n<p>location = \/robots.txt {<br \/>\nallow all;<br \/>\nlog_not_found off;<br \/>\naccess_log off;<br \/>\n}<\/p>\n<p>location ~ ^\/(data|config|\\.ht|db_structure\\.xml|README) {<br \/>\ndeny all;<br \/>\n}<\/p>\n<p>location \/ {<br \/>\n# The following 2 rules are only needed with webfinger<br \/>\nrewrite ^\/.well-known\/host-meta \/public.php?service=host-meta last;<br \/>\nrewrite ^\/.well-known\/host-meta.json \/public.php?service=host-meta-json last;<\/p>\n<p>rewrite ^\/.well-known\/carddav \/remote.php\/carddav\/ redirect;<br \/>\nrewrite ^\/.well-known\/caldav \/remote.php\/caldav\/ redirect;<\/p>\n<p>rewrite ^(\/core\/doc\/[^\\\/]+\/)$ $1\/index.html;<\/p>\n<p>try_files $uri $uri\/ index.php;<br \/>\n}<\/p>\n<p>location ~ ^(.+?\\.php)(\/.*)?$ {<br \/>\ntry_files $1 = 404;<\/p>\n<p>include fastcgi_params;<br \/>\nfastcgi_param SCRIPT_FILENAME $document_root$1;<br \/>\nfastcgi_param PATH_INFO $2;<br \/>\nfastcgi_pass unix:\/var\/run\/php5-fpm.sock;<br \/>\n}<\/p>\n<p># Optional: set long EXPIRES header on static assets<br \/>\nlocation ~* ^.+\\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {<br \/>\nexpires 30d;<br \/>\n# Optional: Don&#8217;t log access to assets<br \/>\naccess_log off;<br \/>\n}<\/p>\n<p>}<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<ul>\n<li>mkdir \u2013p \/var\/www\/owncloud<\/li>\n<li>cd \/var\/www\/owncloud<\/li>\n<li>wget http:\/\/download.owncloud.org\/community\/owncloud-6.0.1.tar.bz2<\/li>\n<li>apt-get install bzip2<\/li>\n<li>tar xvjf owncloud-6.0.1.tar.bz2<\/li>\n<li>cd owncloud<\/li>\n<li>mv * ..\/<\/li>\n<li>mkdir data<\/li>\n<li>chown \u2013R www-data:www-data \/var\/www\/owncloud\/<\/li>\n<li>service nginx restart<\/li>\n<\/ul>\n<p>Browse to your domain, follow on screen instructions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial is to show you how to install ownCloud on Debian 7 using Nginx and PHP5-FPM. In order for this to work correctly you will need to follow these instructions. Please run the following commands: apt-get update dpkg-reconfigure locales (We recommend using en_US.UTF-8 UTF.8) apt-get upgrade apt-get install nano nano \/etc\/apt\/sources.list \u2013 Add the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos<\/title>\n<meta name=\"description\" content=\"Here is how to install ownCloud on Debian 7 with Nginx\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos\" \/>\n<meta property=\"og:description\" content=\"Here is how to install ownCloud on Debian 7 with Nginx\" \/>\n<meta property=\"og:url\" content=\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Howtos\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-12T16:34:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-24T19:22:37+00:00\" \/>\n<meta name=\"author\" content=\"Etapien\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etapien\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/\",\"url\":\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/\",\"name\":\"How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos\",\"isPartOf\":{\"@id\":\"https:\/\/etapien.com\/guides\/#website\"},\"datePublished\":\"2014-03-12T16:34:27+00:00\",\"dateModified\":\"2020-08-24T19:22:37+00:00\",\"author\":{\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\"},\"description\":\"Here is how to install ownCloud on Debian 7 with Nginx\",\"breadcrumb\":{\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/etapien.com\/guides\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install ownCloud on Debian 7 with Nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/etapien.com\/guides\/#website\",\"url\":\"https:\/\/etapien.com\/guides\/\",\"name\":\"Tech Howtos\",\"description\":\"Tech related useful howtos\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/etapien.com\/guides\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424\",\"name\":\"Etapien\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g\",\"caption\":\"Etapien\"},\"url\":\"https:\/\/etapien.com\/guides\/author\/Etapien\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos","description":"Here is how to install ownCloud on Debian 7 with Nginx","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/","og_locale":"en_US","og_type":"article","og_title":"How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos","og_description":"Here is how to install ownCloud on Debian 7 with Nginx","og_url":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/","og_site_name":"Tech Howtos","article_published_time":"2014-03-12T16:34:27+00:00","article_modified_time":"2020-08-24T19:22:37+00:00","author":"Etapien","twitter_misc":{"Written by":"Etapien","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/","url":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/","name":"How to Install ownCloud on Debian 7 with Nginx - Etapien Tech Howtos","isPartOf":{"@id":"https:\/\/etapien.com\/guides\/#website"},"datePublished":"2014-03-12T16:34:27+00:00","dateModified":"2020-08-24T19:22:37+00:00","author":{"@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424"},"description":"Here is how to install ownCloud on Debian 7 with Nginx","breadcrumb":{"@id":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/etapien.com\/guides\/how-to-install-owncloud-on-debian-7-with-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/etapien.com\/guides\/"},{"@type":"ListItem","position":2,"name":"How to Install ownCloud on Debian 7 with Nginx"}]},{"@type":"WebSite","@id":"https:\/\/etapien.com\/guides\/#website","url":"https:\/\/etapien.com\/guides\/","name":"Tech Howtos","description":"Tech related useful howtos","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/etapien.com\/guides\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/c67f514649b78dbb5ef0c254a0521424","name":"Etapien","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/etapien.com\/guides\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55021fd8fb4a829ad64ffab0a92d3b90?s=96&d=mm&r=g","caption":"Etapien"},"url":"https:\/\/etapien.com\/guides\/author\/Etapien\/"}]}},"_links":{"self":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/109"}],"collection":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":1,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/posts\/109\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/etapien.com\/guides\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}