Hosting basic websites?


#1

Is there a way to setup basic websites in UCS? I really don’t need much. What would be great is if I could attach a domain to a shared folder to make the shared folder a web root where I could just dump the site files in it to host them.

If there isn’t such a thing available, what kind of trouble will I cause if I hand edit Apache files? Will it cause problems with updates or is there a sanctioned way to do that sort of thing. Feel free to point me to some documentation if it exists for this. I didn’t find anything when I looked.

Thanks


#2

Hey,

there are no mechanisms in UCS for providing web sites. You’ll have to do the setup yourself.

It Depends™. In UCS a lot of configuration files are generated from template files which combine local server configuration via UCR variables and LDAP-based domain data to form the actual configuration file. Configuration files that are auto-generated can be recognized easily as they all contain the following header:

# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
…

You should really not edit those files as your changes will be lost.

You can edit the template files they were generated from, though I generally advise against that. Modified templates will not be overwritten during UCS upgrades. That can lead to situations where local services won’t start anymore after an upgrade as the old-but-manually-modified configuration file doesn’t work with the newer software version anymore. In such a case you’ll have to transfer your modifications from the modified file to the new, clean template file and regenerate the configuration file from the template afterwards.

As for Apache: you can definitely add new configuration files to the usual places where Apache looks for them on Debian-based systems: /etc/apache2/sites-available, …/conf-available and enable them with a2enconf … respectively a2ensite ….

If you really need to modify template files, I suggest you read a couple of articles about how to deal with those. A while back I wrote a blog post describing how this works.

Kind regards
mosu