greyltc / docker-owncloud

Arch linux based docker container with owncloud
111 stars 37 forks source link

Question on Enviornment Variable - TARGET_SUBDIR #93

Closed robclay closed 8 years ago

robclay commented 8 years ago

Am I able to change the TARGET_SUBDIR variable after initial setup?

greyltc commented 8 years ago

Yes you can. TARGET_SUBDIRis unrelated to ownCloud's internal configuration and so it can be changed whenever without messing up your server.

The TARGET_SUBDIR variable tells the apache server in the container where to serve up your owncloud server. If you want to change it on-the-fly (while the server is running), you'll need to restart apache. Here's how you do that (assuming your container is already setup and running and you named it oc when you started it):

docker exec -it oc sh -c 'apachectl stop; TARGET_SUBDIR=yourmom apachectl start'

Now you can access your oc server by visiting https://localhost/yourmom

robclay commented 8 years ago

Running that command seemed to give me: httpd (no pid file) not running So I stopped and rm'd the container. I then ran with -v TARGET_SUBDIR=/ variable in command line switch. When I went to www.mydomain.com, I was presented the normal log in page. Whoo Hoo! But after login, firefox gives an error 500. "Internal Server Error". DOH!

And for full discloure, I actually tried it using TARGET_SUBDIR=yourmom thinking that it would be funny if that worked, and maybe I was using the wrong slash or something... but also did not work!

Thoughts?

greyltc commented 8 years ago

Hi @robclay , if you see httpd (no pid file) not running, that means apache isn't running, that means you probably haven't started the container properly. Please have a look at the README.md for this project and carefully read and use the commands there for starting the container and hopefully that clears things up.

McBadass commented 8 years ago

I'm not sure if this helps or not, but this is how I have mine set and it works:

-e TARGET_SUBDIR='/'

EDIT: I had posted that I was now having an issue with the latest version, but deleted it because I was just out of space on my docker VM. Maybe check that, too!

greyltc commented 8 years ago

I'm going to close this. The question has been answered.