Forum

owncloud 9

Ivo
11 March 2016, 03:01
Trying to setup Owncloud 9,

webside frontpage url = example.com
owncloud url for access = example.com/cloud

my frontpage works fine but I am getting 404 errors for owncloud.
suggestions? It needs to be .../ownloud not owncloud.example.com

Can I use rewrite to make it work or am I missing fodler configs?

My configs:
UrlToolkit {
ToolkitID = ownCloud
Match ^/data DenyAccess
}

VirtualHost {
Hostname = www.example.com, example.com
WebsiteRoot = /var/www/frontpage
EnforceFirstHostname = yes
RequireTLS = yes,15552000
########################################
###live###
# StartFile = index.html
###backup###
# StartFile = backup.html
###construction###
StartFile = closed.html
########################################

Alias = /.well-known/acme-challenge:/var/www/hiawatha/.well-known/acme-challenge
#ReverseProxy !^/.well-known/ http://81.4.121.132:80 keep-alive
TLScertFile = /etc/hiawatha/ssl/XXXX.pem

#UseGZfile = yes
CustomHeader = X-Frame-Options: sameorigin
CustomHeader = Vary: Accept-Encoding
RandomHeader = 64
PreventXSS = yes
PreventCSRF = yes
PreventSQLi = yes
}
##OwnCloud
VirtualHost {
Hostname = www.example.com, example.com
WebsiteRoot = /usr/share/webapps/owncloud
RequireTLS = yes,15552000

StartFile = index.html
Alias = /cloud:/usr/share/webapps/owncloud

#Setenv HOME = /usr/share/webapps/owncloud
#Setenv HTTP_HOME = /usr/share/webapps/owncloud

#UseGZfile = yes
CustomHeader = X-Frame-Options: sameorigin
CustomHeader = Vary: Accept-Encoding
RandomHeader = 64
PreventXSS = yes
PreventCSRF = yes
PreventSQLi = yes

UseFastCGI = PHP7
TimeForCGI = 15
WebDAVapp = yes
FollowSymlinks = yes
AllowDotFiles = yes
EnablePathInfo = yes

UseToolkit = ownCloud
}
Ivo
11 March 2016, 03:04
I looked everywhere but I do not find a single example how to host services in subdirectories.
With nginx it is possible. Hope their is a way for hiawatha too.
Hugo Leisink
13 March 2016, 19:15
Is your ownCloud installation located in /usr/share/webapps/owncloud? If so, why also point WebsiteRoot to it? And why have two virtual hosts with the same hostname?

In the last virtual host, you specified index.html as the start file. I think ownCloud has an index.php. Use that in the virtual host, or use a Directory section for that virtual host.
VirtualHost {
Hostname = www.example.com
WebsiteRoot = /var/www/frontpage
...
Alias = /cloud:/usr/share/webapps/owncloud
UseDirectory = owncloud
}

Directory {
DirectoryID = owncloud
Path = /cloud
StartFile = index.php
}


I think that this will solve most of your issue, but Hiawatha was built with the idea of running a single application in a virtual host. You mentioned not wanting to use a new hostname (owncloud.example.com), but I had that kind of configuring in mind while developing Hiawatha.
hanscees
19 March 2016, 23:33
I am trying the same here, but errors.

my config is
VirtualHost {
Hostname = oc9.hanscees.net
WebsiteRoot = /usr/share/owncloud
AccessLogfile = /var/www/oc9/logs/access.log
ErrorLogfile = /var/www/oc9/logs/error.log
TimeForCGI = 5
UseFastCGI = PHP5
UseToolkit = joomla
StartFile = index.php
WebDAVapp = yes
# UseDirectory = static, files
}


Install goes fine, but after that:
192.168.0.2|Sat 19 Mar 2016 22:17:58 +0000|404|1036||GET /index.php/apps/files/ HTTP/1.1|Host: oc9.hanscees.net|Connection: keep-alive|Cache-Control: max-age=0|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|Upgrade-Insecure-Requests: 1|User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36|DNT: 1|Accept-Encoding: gzip, deflate, sdch|Accept-Language: nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4

hmm

Hugo Leisink
24 March 2016, 19:49
Try with
EnablePathInfo = yes
This topic has been closed.