我正在使用vagrant/puppet來配置我的testmachine,我使用它來爲apache配置虛擬主機,但是當啓動apache時,我得到一個錯誤,顯然對於奇怪的間距或字符或所以:Puppet/Vagrant:損壞的apache虛擬主機內容
/apache2 start
* Starting web server apache2
Syntax error on line 4 of /etc/apache2/sites-enabled/my-ssl.localhost.conf:
Invalid command '\xc2\xa0\xc2\xa0ServerName', perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed.
清單文件,我寫來配置虛擬主機看起來像這樣
file {'hostfile4':
path => '/etc/apache2/sites-available/my-ssl.localhost.conf',
ensure => present,
content => "
<VirtualHost *:443>
DocumentRoot '/coding/mysite/htdocs/'
ServerName foa-ssl.localhost
ServerAlias foa-ssl.localhost
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0
<Directory '/coding/mysite/checkout/htdocs'>
AllowOverride All
Options All -Indexes
Order allow,deny
Allow from all
php_admin_value short_open_tag Off
AddType application/x-httpd-php .css .js
</Directory>
<Directory '/coding/mysite/app_new/htdocs'>
AllowOverride All
Options All -Indexes
Order allow,deny
Allow from all
php_admin_value short_open_tag Off
AddType application/x-httpd-php .css .js
</Directory>
<Directory '/coding/mysite/cgi-bin'>
Options +ExecCGI
</Directory>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
</VirtualHost>",
}