Directory placement for owncloud and configure?


#1

At present, my website is at:

/var/www/mysite/public

I am adding the cloud to it and would like to keep things together.
my first choice would be to have owncloud at my document root here:

/var/www/mysite/public/owncloud

The manual install instructions suggest that it not be in my document root.
please make a suggestion.

Also, at present, I am getting an error saying

Can't write to config directory!
This can usually be fixed by giving the webserver write access to the config directory.


#2

You mean the data folder? You could place it somewhere else in your file system, probably out of /var/www... only webserver user must have full access to it. If you use admin panels, this can be a bit tough because they don't like it to organize files yourself and restrict access to your webroot very efficiently.

That's a different issue. But you need to give the webserver user full permission to the config folder.


#3

I have deleted all my work and have done as complete a removal of my original install as I know how to do. Now, I have reinstalled owncloud. There was an error during the reinstall saying that apache was not setup for it or something like that. I did not make a note of it but on examination the apache sites available config file was missing. I created the one shown below:


	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com
ServerAdmin me@example.com
DocumentRoot /var/www/example.com
ServerName example.com
ServerAlias www.example.com
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com [OR]
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
vim: syntax=apache ts=4 sw=4 sts=4 sr noet

This is fine since I would like it to be a website of it's own and it now appears to running as it should with a signon screen for initial setup in the browser.

However, before I continue, I think I now may need to do some additional work. In the owncloud manual docs (https://doc.owncloud.org/server/9.0/admin_manual/installation/source_installation.html
), they say to create a symlink something like:


Alias /owncloud "/var/www/owncloud/"
<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All
 <IfModule mod_dav.c>
  Dav off
 </IfModule>
 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud
</Directory>

EDIT: Sorry. Text in config files not showing correctly.

What should I do now?