Koozali.org: home of the SME Server

httpd.conf keeps changing -why??

mjc

httpd.conf keeps changing -why??
« on: June 05, 2006, 02:43:03 PM »
Hello to all. I'm a newbie to this forum. Could you pardon my probably obvious question, but its driving me crazy.
I have a version 6 SME server that I use as a web server. Intermittently the external access to our home web site goes down, only accessible on the local network.
The problem appears to be in the httpd.conf.  
This is what I find:-
#------------------------------------------------------------
# Primary ibay directories (Primary )
#------------------------------------------------------------
   
<Directory /home/e-smith/files/ibays/Primary/html>
    Options Indexes
    Options +Includes
    AllowOverride None
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.100.0/255.255.255.0

</Directory>
If I change the 2nd bottom line to Allow from all.

It all works again.
But with no input at all from me a few days later the server goes back to local access only.
WHY????
Any input gratefully received.

Offline byte

  • *
  • 2,183
  • +2/-0
httpd.conf keeps changing -why??
« Reply #1 on: June 05, 2006, 02:49:05 PM »
How did you edit the file?

If you done this via the correct templating way then I don't know what can be wrong, my guess is you edited the file directly
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

mjc

httpd.conf keeps changing -why??
« Reply #2 on: June 05, 2006, 10:51:02 PM »
As far as I can tell, the template seemed to to be correct even if the site was down. I admit to correct the problem I editted the httpd.conf file directly as I had done with other Apache servers.
The bit that I can't work out is that I do nothing at all to the server configuration, not even look at the server manager and the website goes from working to not working.
Would you be so kind to, very briefly, tell me how to edit the template for httpd.conf so I can fix this annoying problem?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
httpd.conf keeps changing -why??
« Reply #3 on: June 05, 2006, 11:09:25 PM »
What does the following command output:
Code: [Select]
db accounts getprop Primary PublicAccess
This should be 'global' so that your Primary site is worldwide accessible like you are trying to do (manually). If you would like it to be wordlwide readable again you should issue the following commands:
Code: [Select]
db accounts setprop Primary PublicAccess global
expand-template /etc/httpd/conf/httpd.conf
signal-event reboot

This way the access level will be modified in the internal SME Server database, the new configuration will be incorporated in the httpd configuration file and a reboot will reload the httpd daemon so it reflects the changes. (You can also restart httpd instead of rebooting the server but unfortunately I don't remember the command for that).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
httpd.conf keeps changing -why??
« Reply #4 on: June 05, 2006, 11:15:15 PM »
Quote from: "cactus"
(You can also restart httpd instead of rebooting the server but unfortunately I don't remember the command for that).
From somewhere deep in the back of my head:
Code: [Select]
service httpd restartHow simple can it be? :-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

mjc

httpd.conf keeps changing -why??
« Reply #5 on: June 06, 2006, 12:53:23 AM »
db command does not do anything on my system.
This is what came up.
bash: db: command not found

Offline byte

  • *
  • 2,183
  • +2/-0
httpd.conf keeps changing -why??
« Reply #6 on: June 06, 2006, 12:17:49 PM »
Quote from: "cactus"
service httpd restart[/code]

No don't use "service" command do the full path i.e

/etc/rc7.d/S**http-e-smith restart

and/or

/etc/rc7.d/S**http-admin restart

Where ** is a number.

Also the "db" command is only available as a "system" command where as all over version's of SME you have to type the full path i.e

/sbin/e-smith/db accounts getprop Primary PublicAccess
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
httpd.conf keeps changing -why??
« Reply #7 on: June 06, 2006, 12:46:21 PM »
byte & cactus

To correct this for the record:

> /etc/rc7.d/S**http-e-smith restart
> and/or
> /etc/rc7.d/S**http-admin restart

should be
/etc/rc7.d/S**httpd-e-smith restart
and/or
/etc/rc7.d/S**httpd-admin restart
Where ** is a number.


You can also correctly use

/etc/init.d/httpd status

httpd (pid 23233 23232 23231 23230 23229 23228 23227 23226 23225 23224 23223 12576 2559) is running...

/etc/init.d/httpd restart

Stopping httpd:                                            [   OK   ]
Starting httpd:                                            [   OK   ]

/etc/init.d/httpd-admin status

httpd-admin (pid 23233 2559) is running...

/etc/init.d/httpd-admin restart

Shutting down http-admin:                                  [   OK   ]
Starting httpd-admin:                                      [   OK   ]
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: httpd.conf keeps changing -why??
« Reply #8 on: June 06, 2006, 12:54:50 PM »
mjc

> WHY????

For a better understanding of how the templating system works in sme server, see the Documentation link at the left, and read the Basic dcumentation re Architecture overview & Customising.

Simplistically, the db files are read by the templates, which when expanded write values to the configuration files.
...

Offline byte

  • *
  • 2,183
  • +2/-0
httpd.conf keeps changing -why??
« Reply #9 on: June 06, 2006, 02:03:57 PM »
Quote from: "RayMitchell"
byte & cactus

/etc/rc7.d/S**httpd-e-smith restart
and/or
/etc/rc7.d/S**httpd-admin restart
Where ** is a number.


Yes sorry typing to quick here...Thanks Ray
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

mjc

httpd.conf keeps changing -why??
« Reply #10 on: June 06, 2006, 03:44:06 PM »
Thanks to the correspondents. Looks like I have a fair bit of reading to do!
Regards to all.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
httpd.conf keeps changing -why??
« Reply #11 on: June 06, 2006, 11:49:21 PM »
Quote from: "mjc"
db command does not do anything on my system.
This is what came up.
bash: db: command not found


Please use:

/sbin/e-smith/db accounts show Primary