0
Running Apache 2.4.10 on 'Jessy' Debian 8 ..
I'm trying to get ownCloud to run on my Raspberry Pi2 but the Apache part turns out to be a bit of a hurdle. After going through the Apache docs, several online guides, youtube vids I'm utterly confused. So I'm looking for confirmation and answers hoping there's an Apache expert online :)
Okay, so to function ownCloud needs its .htaccess file to be handled and by now I understand I need to set the "AllowOverride" directive (in a sectionblock) to "All" in some config file.
Either "httpd.conf" or -in my case- "apache2.conf" is Apache's main config file (found at /etc/apache2/). Right ?
And there's also a possibility of a separate config file just for the ownCloud website ? A vhost config file ? How do I go about creating such a vhost file (name? location?) ?
Guides point to the '/etc/apache2/sites-enabled' location and that I should edit "000-default.conf" but that's not a file .. it's a symbolic link to a corresponding file at '/etc/apache2/sites-available'. Do I understand it right that I should put -let's say- vhost code sections in that one file ?
Now the actual questions:
- at what level should I enable htaccess, at the main config or in a vhost config ? trying to keep security as tight as possible ..
- does anyone know if altering the AllowOverride directive the only thing is what needs to be done ? A rewrite module is also often mentioned. How about that ?
I'm gonna go with davidgo's suggestion to use the AllowOverride specifically in the virtual host file for owncloud. And I get the rather elegant logic of defining a vhost in sites-available and then 'enabling' it by putting a sym.link in sites-enabled. Thank you Paul for pointing that out to me.
Thanks in advance for your time and effort !
Guys, I think I made a thinking error. Everywhere I look I see: you need virtual hosts when running multiple websites on 1 machine. But correct me if I'm wrong, shouldn't it say: when running multiple websites with different domainnames on 1 machine ?? That would mean that I don't need to create a virtual host; I only got one domainname (and addressing it using my public IP address ..). Then remains the question, can I use a ''Directory /var/www/owncloud'' block, in the main apache2.conf file, to specify the AllowOverride All there ? – Supr – 2016-02-04T23:29:13.060
Tested it, placed the block near the other Directory-blocks in apache2.conf, rebooted and using a .htaccess with "blabla" in it, confirmed that .htaccess was being handled (got an error that didn't show up when I used the original .htaccess). – Supr – 2016-02-05T23:32:53.427