Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Jim Hale on March 18, 2003, 03:17:33 PM

Title: Log Rotation Screwing Up My httpd.conf
Post by: Jim Hale on March 18, 2003, 03:17:33 PM
I have to make certain changes to my httpd.conf file to make one of my websites work correctly. Whenever SME rotates the logs, it rebuilds the httpd.conf file (which I understand so it can rename the log files) - problem is, when it does that, it wipes my changes and the site doesn't work anymore.

I understand the concept of the template files and have tried making modifications to where it rebuilds them and makes the changes that I need, but I can't make it work.

What I need is for the httpd.conf to comment OUT (or completely remove) the \files ALIAS for my sites. I have gone thru ALL the template files and changed what I thought needed to be changed, but it still won't comment out these lines.

In the top of the httpd.conf, it states 'Do not alter this file but use the template files, blah blah blah and check www.e-smith.org for details'. I'm trying to locate a list of what each template file controls but haven't been successful.

Can someone PLEASE point me in the right direction? This is driving me nuts and has been going on for 3 weeks.

Thanks! :)
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Bill Talcott on March 18, 2003, 06:04:48 PM
http://www.e-smith.org/custom explains the template system. I don't know of any lists of what each fragment "controls". Many of the fragments are scripts that pull values out of the configuration database, so they don't control just one thing. The fragments are assembled in order to make the config file, so you should just be able to browse through the fragments until you find the one you want... Obviously, the last line in a config file won't be created via a 10something file. And the fragments are usually named according to what they do, so you should be able to narrow it down to checking a few files.
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Jim Hale on March 19, 2003, 02:44:33 AM
OK - when I make changes in the templates, how do I Trigger a Rebuild of the httpd.conf file to make sure that everything works fine before I wait for the Log Rotation and THEN find out that it didn't work? :)
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Dan Brown on March 19, 2003, 02:58:21 AM
/sbin/e-smith/expand-template /path/to/file
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Jim Hale on March 19, 2003, 03:07:47 AM
OK - Tried this:

[root@SME-Server56 root]# /sbin/e-smith/expand-template /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent

and got:

ERROR: No templates were found for //etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent

That was the only file I've modifed (so far). :)
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Dan Brown on March 19, 2003, 03:14:28 AM
No, no, it's expand-template /path/to/httpd.conf (/etc/httpd/conf/httpd.conf).
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Jim Hale on March 19, 2003, 03:43:46 AM
In My Stupidity - I noticed that AFTER I hit POST in response to your last message. :)

Got THAT part working fine now! I did about 5 rebuilds and it '#''s all the \File Aliases. WooHoo! :)

Now - I'm trying to change the php_basedir for ONE bay, I did the search of the forums, ran the command line to change the info in the db but when I do the rebuild, it still doesn't change it. I looked in the db file itself and it IS changed, but the httpd.conf still has the full path to the ibay listed. :/

More experimenting... :)
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Jason Judge on March 20, 2003, 02:24:13 AM
Don't forget to change (or add) a custom template rather than the standard templates. You will need to craete:

/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent

as a copy of /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent

If you don't then you run the risk of having your template changes over-written if you upgrade the system.

-- JJ
Title: Re: Log Rotation Screwing Up My httpd.conf
Post by: Jim Hale on March 20, 2003, 02:59:39 AM
Gotcha!

Thanks Jason - I almost forgot about that part. :)

Did it, forced a rebuild and everything is still hunky-dory. :)