Question on Enviornment Variable - TARGET_SUBDIR
robclay opened this issue · 5 comments
Am I able to change the TARGET_SUBDIR variable after initial setup?
Yes you can. TARGET_SUBDIR
is 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
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?
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.
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!
I'm going to close this. The question has been answered.