## if you see following message during "puppet agent --test --debug"
err: /Stage[main]/Apache/Service[httpd]/ensure: change from stopped to running failed: Could not start Service[httpd]: Execution of '/sbin/service httpd start' returned 1: at /etc/puppet/modules/apache/manifests/init.pp:77
## test it again manually.
# /sbin/service httpd start
Starting httpd: Syntax error on line 38 of /etc/httpd/conf/httpd.conf:
Invalid command 'LogFormat', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]
## manually remove following lines starting from line 38
$vi /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
## and try again, you will see another error message like
# /sbin/service httpd start
Starting httpd: Syntax error on line 26 of /etc/httpd/conf.d/15-default.conf:
Invalid command 'CustomLog', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]
## edit /etc/httpd/conf.d/15-default.conf remove following line starting from line 26
CustomLog /var/log/httpd/access_log combined
## and try again
# /sbin/service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
# it works.
## DON'T RUN "puppet agent ..." command again.
######
## check your contents under /var/www/html for customization.
$ ls -la
total 17528
drwxr-xr-x 3 root root 4096 Jul 18 02:28 .
drwxr-xr-x 6 root root 4096 Jul 17 09:50 ..
-rw-r--r-- 1 root root 107 Jul 18 02:28 index.html
drwxr-xr-x 15 1226 550 4096 Jul 18 02:43 mediawiki-1.19.1
-rw-r--r-- 1 root root 17929538 Jun 13 2012 mediawiki-1.19.1.tar.gz
[ec2-user@wiki2 html]$ pwd
/var/www/html
No comments:
Post a Comment