Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit httpd while running

Status
Not open for further replies.

optimised

Technical User
Jun 21, 2001
96
US
Hello,

I have httpd and named running. If I want to edit the httpd to add a new vhost and named.conf to add new domain which also requires a new zone file, do I have to shut down both services? Or what is the process to updating services to recognise new additions or changes.


 
Can edit the file while the apache process is still running. After you finish and save your changes, restart apache for them to take effect.

I'm not sure about named, likely the same thing though, since most programs only read their configuration files when they start.
 
pidof httpd | xargs kill -hup ; after edit
pidof named | xargs kill -hup ; after edit
 
Hi,

You can quite happily edit while the daemons are running because they would have read the config into memory when starting...

To effect config changes without explicitly restarting the servers you can do :

kill -HUP 'cat /usr/local/apache/logs/httpd.pid'

or even

killall -HUP httpd

This causes apache to close all client listener processes, close logs, re-read the config file, open logs & spawn new child listener processes. In effect it does an immediate restart.

named is similar - e.g. killall -HUP named

Regards
 
Thanks Folks,

Trying to work on my zone file to answer to domain name without the in browser. This zone file seems to be working with no errors but can't resolve domain without the When I try to add a line such as
myhostman.com. IN A x.x.x66
I recieve error in log Ignoring out of zone data


$TTL 86400
@ IN SOA ns1.myhostman.com. hostmaster.myhostman.com. (
20010829; Serial
12H ; Refresh
1H ; Retry
2W ; Expire
1D ) ; Minimum
IN NS ns1.myhostman.com.
IN NS ns2.myhostman.com.
www IN A x.x.x.66
ftp IN A x.x.x.66
www IN A x.x.x.67
mail IN A x.x.x.67
IN MX 10 mail.myhostman.com.
 
Hi,

You can just have a line like this :

IN A x.x.x.x <----
www IN A x.x.x.x

etc. - i.e. without a prefix to add to the domain name.

Rgds
 
Just for clarification
Do I leave the in as well or take them out like below.

$TTL 86400
@ IN SOA ns1.myhostman.com. hostmaster.myhostman.com. (
20010829; Serial
12H ; Refresh
1H ; Retry
2W ; Expire
1D ) ; Minimum
IN NS ns1.myhostman.com.
IN NS ns2.myhostman.com.
IN A x.x.x.66
ftp IN A x.x.x.66
IN A x.x.x.67
mail IN A x.x.x.67
IN MX 10 mail.myhostman.com.
 
You'd just add a line(s) like this ...

$TTL 86400
@ IN SOA ns1.myhostman.com. hostmaster.myhostman.com. (
20010829; Serial
12H ; Refresh
1H ; Retry
2W ; Expire
1D ) ; Minimum
IN NS ns1.myhostman.com.
IN NS ns2.myhostman.com.
IN A x.x.x.66 <----
www IN A x.x.x.66
ftp IN A x.x.x.66
www IN A x.x.x.67
mail IN A x.x.x.67
IN MX 10 mail.myhostman.com.

Rgdz
 
Thanks Ifincham but I have another domains zone file set up like that and it only answer's to the well.

Do I need to add anything to my vhost container?
or is the second problems maybe..

NameVirtualHost 111.22.33.44

<VirtualHost 111.22.33.44>
ServerName DocumentRoot /</VirtualHost>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top