7,166
edits
No edit summary |
|||
Line 114: | Line 114: | ||
my_hostname = os.popen("/bin/hostname -s").read().rstrip() | my_hostname = os.popen("/bin/hostname -s").read().rstrip() | ||
# replace the ubuntu hostname in /etc/hosts | # replace the ubuntu hostname in /etc/hosts | ||
mp = {'localipv4' : my_ip, 'hostname' : my_hostname, 'fqdn' : my_fqdn} | mp = {'localipv4' : my_ip, 'hostname' : my_hostname, 'fqdn' : my_fqdn} | ||
t = Template(file="/usr/local/etc/bind/templates/hosts.tmpl", searchList=[mp]) | t = Template(file="/usr/local/etc/bind/templates/hosts.tmpl", searchList=[mp]) | ||
Line 294: | Line 294: | ||
mod_sed の書き換えルールはこんな感じかな | mod_sed の書き換えルールはこんな感じかな | ||
<pre> | <pre> | ||
<IfModule mod_sed.c> | <IfModule mod_sed.c> | ||
AddOutputFilter Sed html | AddOutputFilter Sed html | ||
OutputSed "s/www\.example\.com/test.example.com/g" | OutputSed "s/www\.example\.com/test.example.com/g" | ||
</IfModule> | </IfModule> | ||
</pre> | </pre> | ||