10.2 here. I am trying to run Wordpress out of a jail created with iocage. Installation of Nginx, php-fpm, MySQL, and Wordpress (using pkg install) went out of glitch. Here are few configuration files. I would appreciate any help.
nginx.conf
Some modification from vanilla php-fpm.conf
php.ini
I also tried puting 0.
The performance is truly abysmal. I need to wait anywhere from 45-90 second to page to load. Running vanilla php page is OK.
nginx.conf
Code:
user www;
worker_processes 8;
error_log /var/log/error.log info;
# pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/access.log;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name lweb.autonlab.org;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#root /usr/local/www/lweb;
root /usr/local/www/wordpress;
index index.php index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
# fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
# fastcgi_param SCRIPT_FILENAME /usr/local/www/lweb/$fastcgi_script
_name;
fastcgi_param SCRIPT_FILENAME /usr/local/www/wordpress/$fastcgi_sc
ript_name;
include fastcgi_params;
}
}
}
Some modification from vanilla php-fpm.conf
Code:
events.mechanism = kqueue
listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
listen.mode = 0660
listen.allowed_clients = 127.0.0.1
pm = ondemand
pm.max_children = 80
pm.start_servers = 8
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php.ini
Code:
cgi.fix_pathinfo=1
I also tried puting 0.
The performance is truly abysmal. I need to wait anywhere from 45-90 second to page to load. Running vanilla php page is OK.