Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: WEBlance on December 14, 2006, 10:40:40 PM

Title: What does this mean?
Post by: WEBlance on December 14, 2006, 10:40:40 PM
In the start of file httpd.conf in ./etc/httpd/conf this text is displayed:

Manual changes will be lost when this file is regenerated

I understand that there is a file somwhere on the server that contains the "original" settings. Where is this file located, if I need to correct this source?

/Carl
Title: Re: What does this mean?
Post by: cactus on December 14, 2006, 11:08:43 PM
Quote from: "WEBlance"
In the start of file httpd.conf in ./etc/httpd/conf this text is displayed:

Manual changes will be lost when this file is regenerated

I understand that there is a file somwhere on the server that contains the "original" settings. Where is this file located, if I need to correct this source?

/Carl
Have a look at the manual (http://smeserver.sourceforge.net/sme70/manual) and the development guide (http://mirror.contribs.org/smeserver/contribs//gordonr/devguide/devguide.pdf) about the templating system and the (internal) configuration databases. A lot is explained there.

In short:
All (at least all important) configuration files are templated. You will have to change templates or database values and regenerate the configuration files to keep your changes permanent. If you modify the configuration file directly changes will be overridden the next time the configuration files are expanded.
Title: What does this mean?
Post by: WEBlance on December 14, 2006, 11:15:13 PM
Just to skip the hard part (reading a lot of manuals), do anyone know where the httpd.conf template is located?

Yes I know, I'm lazy!!!
Title: What does this mean?
Post by: cactus on December 14, 2006, 11:21:29 PM
Quote from: "WEBlance"
Just to skip the hard part (reading a lot of manuals), do anyone know where the httpd.conf template is located?

Yes I know, I'm lazy!!!
Yes but I think you should read it anyhow. All templates are located in the /etc/e-smith/templates* directory. Original templates are in the ./templates folder, custom ones go into the templates-custom directory. Custom templates do not exist by default but you will need to create the directory structure if it does not exist. Copy the original template fragment there, make you modifications and expand your template and restart the service that belongs to the configuration files:

you can expand like this:
Code: [Select]
expand-template /path/to/actual/configuration/file

For the httpd the last actiosn would be:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith restart


But don;t say i did not warn you when you run into trouble.. please read the section about the template system before you start. It is well worth the time.
Title: What does this mean?
Post by: WEBlance on December 14, 2006, 11:45:40 PM
Thank You very much!!! I've been havin problems with the httpd,conf since I upgraded my SME 6.0.1 to 7. Several lines in the httpd.conf were wrong, and now I finally can fix the problem.

I know that the best would be to install a fresh SME 7 and start from the bottom, but I haven'd had the time and strenght to do it . . . yet.

/Carl
Title: What does this mean?
Post by: Boris on December 17, 2006, 12:20:50 AM
All versions of SME (and former E-Smith) had template system. The problem and solution applied to to all of them.