× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Owncloud Appache Configuration

osilvab
Aspirant

Owncloud Appache Configuration

 

My apache configuration is a bit broken now. fortunately the admin page works well.

 

I installed the owncloud add-on and it was working perfectly on the local host. Then I wanted to have access to it from public internet. Initially I set up a DDNS in no-ip.com  then I just change the etc/apache2/sites-available/default file where I added the virtualhost for ports 80 and 443, I am not sure this was the file I had to edit, i also set-up the port forwarding in the router. After this I could access the owncloud from my local network and from internet through the no-ip domain. Then I wanted to create the SSL certificate and I tried using the cerbot, but it failed in different ways. One of the error was that the port 443 was being used, then I kill apache by console but still the error was there. The problem was that after that I couldn’t start apache, was getting some code error. I just did a reboot to the whole NAS and apache started but the owncloud connection was broken.

 

ThenI tried local.ip/owncloud I get “The requested URL /owncloud/ was not found on this server.” But when I tried my local.ip I get to the readynas admin site as expected and the owncloud is up and running. I brought back the original default etc/apache2/sites-available/default but it did'nt work. I found out that owncloud is still accessible using http://local.ip/owncloud/index.php/login and also https. I tried different things found in the apache forums and owncloud forums, but somehow the file system is different and they hace other files and other configuration files. then i think i was starting to get the things worse and I decided to stop and ask for help.

 

Right now the things are like this:

 

http://local.ip/owncloud goes to http://local.ip/owncloud/index.php/login and works well

https://local.ip/owncloud shows text that starts with "* @author Lukas Reschke <lukas@statuscode.ch> * @author Morris..... "  certificate not working

http://no-ip.domain/owncloud works well

https://no-ip.domain/owncloud works well, certificate not working

 

I also tried to use my owndomain that I have in godaddy but i couldnt make it connect to the no-ip domain. I created a masked forwarding but I dont know why it doesnt reach.

 

I just don’t know how to fix the local.ip and how to add ssl cerfiticates without messing up the rest, should i add virtualhosts for the no-ip domain and the godaddy domain?

 

I have spent some days on it, but cleary im still beginner to this things. thanks a lot for any help!

 

/Oliver

 

Message 1 of 8
osilvab
Aspirant

Re: Owncloud Appache Configuration

I gave it anothe try following the thread of @chrhei and I succeeded!

 

I was'nt exactly the same as he had, instead of:

 

# ./certbot-auto certonly --standalone-supported-challenges tls-sni-01 -d fqdn.yourdomain.com

 

I just ran

 

 

/opt/letsencrypt/certbot-auto

 

it first asked me the domain and later said me that there wasnt any virtualhost configured for the domain and gave me to choose a configfile i guess from the /etc/apache2/sites-available I chose the default file.

then, it gave again the same warning and asked again for the file, I chose the same. An error appear but it also prompted that the certificate was created and it was located in /etc/letsencrypt/live/domain.com

 

I checked andit was there, i continue followig the instructions of the thread, edited the ssl.conf, copied the files and restarted apache.

 

for the apache configuration I followed this guide using the ports 80 and 443 and the root directory for owncloud  in the /apps/owncloud/https.conf file , restarted apache and it worked. I added a redirect from http to https that seems to work

Redirect permanent / https://www.yourdomain.com

 

for the renewal I tested both ways in the sources I refered here, and both worked well. I created a cron as suggested in the latest refered guide. So this part worked, im not so sure if this will work for someone else as I have messed up a bit before, maybe I did some unnecessary things and it can be done in a better way.

 

 

I managed to setup the domain at godaddy in the following way:

 

-A Register from @ to https://www.yourdomain.com

-CNAME from www to noip.domain.com

 

I tried to setup an additional subdomain cloud.yourdomain.com forwarded to noip.domain.com/owncloud but it didnt work. any idea how to to this? should it be done in godaddy or in noip?

 

I still have the problem of the local.ip:

https://local.ip/owncloud shows text that starts with "* @author Lukas Reschke <lukas@statuscode.ch> * @author Morris..... "  certificate not working

 

any suggestion?

 

Message 2 of 8
osilvab
Aspirant

Re: Owncloud Appache Configuration

I solved the problem with the locahost:

 

I had file owncloud.conf in /etc/apache2/sites-available and a symbolic link pointing to this in /etc/apache2/sites-enabled with this:

Alias /owncloud	/apps/owncloud/web
<Directory	/apps/owncloud/web>
	Options		-MultiViews +FollowSymLinks -Indexes
	AllowOverride	all
	Order		allow,deny
	Allow		from all
</Directory>

I replaced with this

Alias	/owncloud	/apps/owncloud/web
<Directory	/apps/owncloud/web>
	Options		-MultiViews +FollowSymLinks -Indexes
	AllowOverride	all
	Order		allow,deny
	Allow		from all
	php_admin_value upload_tmp_dir "/apps/owncloud/web/data/data/tmp"
</Directory>
Header always add Strict-Transport-Security "max-age=15768000"

and now it is working.

 

So right now everything works stable. I just would like to have a subdomain cloud.yourdomain.com pointin directly to the owncloud instance.

when i go to yourdomain.com it goes to the readyCloud enviroment. I guess i can not do anything about this. but would be better if this could be in  subdomain also like ready.yourdomain.com

 

please some help on this would be very useful!

 

Message 3 of 8
Sandshark
Sensei

Re: Owncloud Appache Configuration

You can do that with virtual hosts:

 

<VirtualHost *:80>

DocumentRoot "/apps/owncloud/web"

ServerName owncloud.mydomain.com

</VirtualHost>

 

Listen 80

<VirtualHost *:80>

DocumentRoot "/data/mydomain"

ServerName www.mydomain.com

</VirtualHost>

 

Of course, keep any other directives that are already there.  And I think you can use the * wildcard in the second one, and it will redirect everything that matches except what is specified above it.  I did all this a few years back, but it's hazy now.  Had you done this first, it probably would have stopped the error messages you got, too.

 

Try to do everything in a separate file, not modify an existing file.  That way, it will survive an OS or OwnCloud update.  In OS4.x, there was a directory that was "included" in the standard .conf file and any .conf you put there got executed.  I'm sure there is something similar on OS6.x, but I'm away from home right now and can't check.

 

I was working on getting the getssl script to work as an alternate to Cerbot, but ran into problems the way the built-in default web page redirection works.  It does make the share the primary site, probably with an alias (I got called away in mid debugging), but it shows it in the address bar.  That is, it shows as www.mydomain.con/mysite not just www.mydomain.  So when the script executes and tries to confirm access to www/mydomain.com/.well-known/acme-challenge it doesn't exist.  (I'm setting up both OwnCloud and another site, though the other is just a filler right now.)  It needs to go to www/mydomain.com/mysite/.well-known/acme-challenge.    I think if it got past that one, it would likely have a similar problem with the owncloud directory.  I think this kind of virtual host will solve that problem, too.  But since you've finally had success with Cerbot, I may just follow in your footsteps.  There is no telling if I'll run into another reeor once I get past this one.

 

 

Message 4 of 8
osilvab
Aspirant

Re: Owncloud Appache Configuration

Thanks, I will try that, Actually there is a OS update available now and im afraid something will get broken. i will back up those folders before running it and hopefully it will survive.
Message 5 of 8
Sandshark
Sensei

Re: Owncloud Appache Configuration

Well, I tried it and it doesn't do a thing, at least not as a separate file in etc/frontview/apache.  There must be something in the standard configuration that prevents it.  I tried deleting http-share-redirect.conf, figuring the RewriteRule there might be taking precedence  but the system re-generated it on boot.  I tried using that name for my .conf with the virtualhost commands and got errors.

Message 6 of 8
osilvab
Aspirant

Re: Owncloud Appache Configuration

do you refer to the cerbot? It didnt modify anything in my fv/apache either. it actually just created the certificate file. but the Apache configuration i guess has to be done manually. I can not say with certainty what is needed. As i did several trials an error until something work. if you need me to check any specific file of my setup i can do it and tell you what is there.
Message 7 of 8
Sandshark
Sensei

Re: Owncloud Apache Configuration

I have the certificates (well, the ones from the test server for now) from using GETSSL.  I was hoping to find an easier way of installing them to help others before I went down the manual path.

Message 8 of 8
Top Contributors
Discussion stats
  • 7 replies
  • 4178 views
  • 0 kudos
  • 2 in conversation
Announcements