我設置了一個傀儡文件流浪用來提供一個LEMP棧,到目前爲止,我已經能夠安裝的一切,我通過這個需要:正確如何通過Puppet(在Vagrant上)連接Nginx和PHP?
exec { "apt-get update":
command => "/usr/bin/apt-get update",
}
package { "acl":
ensure => "present",
require => Exec ["apt-get update"],
}
class nginx{
package { "nginx":
ensure => present,
require => Exec ["apt-get update"],
}
service { "nginx":
ensure => "running",
require => Package["nginx"],
}
file { "/var/www":
ensure => "link",
target => "/vagrant/web",
require => Package["nginx"],
notify => Service["nginx"],
force => true,
}
}
class php {
package { "php5-cli": ensure => present }
package { "php5-dev": ensure => present }
package { "php5-mysql": ensure => present }
package { "php-pear": ensure => present }
package { "php5-common": ensure => present}
package { "php5-fpm": ensure => present}
package { "php5-cgi": ensure => present}
package { "php-apc": ensure => present}
exec { "pear upgrade":
command => "/usr/bin/pear upgrade",
require => Package["php-pear"],
}
}
class mysql {
package { "mysql-server":
require => Exec["apt-get update"],
ensure => present,
}
service { "mysql":
enable => true,
ensure => running,
require => Package["mysql-server"],
}
exec { "Set MySQL server root password":
require => Package["mysql-server"],
unless => "/usr/bin/mysqladmin -uroot -proot status",
command => "/usr/bin/mysqladmin -uroot password root",
}
}
include nginx
include php
include mysql
我已經流浪設置,我爲此使用了一個LAMP堆棧腳本,它的工作完美無瑕;然而,用Nginx代替Apache和php-fpm代替php5導致了休息。每當我嘗試加載我的網站時,我都會得到一個「Welcome to nginx!」。如果我指定圖像(或任何其他靜態文件)的特定路徑,則圖像加載。如果我指定了PHP文件的特定路徑,則PHP文件將被下載而不是執行。
我使用Ubuntu 12.04 64位。
我在想,套接字未正確地從Nginx的一側設置,但我不能完全肯定通過傀儡體現文件的可移植性我如何設置它。
想法?
你最有可能丟失nginx的配置PHP5-FPM –
@AurimasLičkus如何指定通過木偶任何想法? – antjanus