goodboynyc's picture

When I had been messing around with Owncloud last week on windows I was able to bring it up online with Wamp and changin the httpd.conf file (if i remember correctly). Since then I've hopped on to turnkey and it's been simple to set up but theres no httpd.conf file like there was with the windows version. I'm not sure how to bring it up online or configure apache to let me access it over the web (assuming I've port-forwarded correctly).

Forum: 
Jeremy Davis's picture

I've never used Apache on Windows, but I assume that it is structured the way that Apache themselves suggest/provide. RedHat (and derivatives e.g. CentOS) also use the configuration that I imagine you are familiar with.

However Debian (and it's derivatives such as TurnKey and Ubuntu) does stuff differently (and IMO better). Instead of having a monolithic httpd.conf; the conf file is broken up into multiple purpose specific files.

So if you want to add a new port, you add it to /etc/apache2/ports.conf if you want to edit a module config; you edit /etc/apache2/mods-available/module-name.conf. If you want to enable/disable a specific module the you use the a2enmod/a2dismod module-name commands. They just create/delete symlinks between /etc/apache2/mods-enabled/module-name.conf and /etc/apache2/mods-available/module-name.conf. Same for virtualhosts or site config (what you are after). They all reside in /etc/apache2/sites-available/site-name.conf and are enabled/disabled with a2ensite/a2dissite site-name.

So if you want to adjust the Apache config for ownCloud; you'll want to edit /etc/apache2/sites-available/owncloud.conf

To test what you've done, reload Apache:

service apache2 reload

Another word of warning (for Windows users). Whatever you do DO NOT edit a Linux configuration file in Windows Notepad. It mangles the files and makes them essentially unusable (even though they'll look fine in Windows). Nano is pre-installed in TurnKey and is as easy to use (IMO) as Notepad. Or if you want to edit files in Windows, get yourself a copy of Notepad++.

goodboynyc's picture

So if I wanted to access my owncloud from outside of my LAN it'd have to edit the 

/etc/apache2/sites-enabled/owncloud.conf or,

/etc/apache2/sites-available/owncloud.conf or,

/etc/apache2/conf-enabled/owncloud.conf?

 

 

 

 

Jeremy Davis's picture

The sites-available are the files. The sites-enabled are just symlinks to the sites-available (that are in use).

Add new comment