OpenBSD上的PHP-FPM 8.2 7.3
#php #openbsd #phpfpm #httpd

-

OpenBSDð1ard1ard -1t-11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111E11111MP £Áo,thate¼°ë >

さらに、OpenBSD httpd と統合すると、その koude0 機構によってサーバーをセキュアな状態で維持するのに役立ちます。もちろん追加で relayd と統合することも可能です。

- § â±â¼php的 - 找到Luxembourg bru nne ettelbach的Pquate lux nfetk 1 On on Luxembourg- forooluxembourgàrfoo luxemburger cscopin(这个职业2 cco-³2cco-use添加了u this设备在luxembourg的claun Advers of this forppos电荷列表上新的添加协会WEEC CHARCE′C(Luxembaucc用户Cuen c str.2所有文章©â¾¾/po / po / po / acmue this this this在卢森堡)

æ -¬ �μ¼¼ â¾-p>

ç°至¢

  • OS:OpenBSD 7.3
  • 网络:OpenBSD HTTPD
  • PHP: 8.2 with PHP-FPM
â€â€

-

phpâ®®stry

ã€»è ¾ -

$ doas pkg_add php

以äst :

quirks-6.121 signed on 2023-08-02T17:33:30Z
Ambiguous: choose package for php
a   0: <None>
    1: php-7.4.33p0
    2: php-8.0.29
    3: php-8.1.22
    4: php-8.2.9
Your choice:

“ 4” ; P>

ǵæ※¥äst

php-8.2.9:capstone-4.0.2: ok
php-8.2.9:femail-1.0p1: ok
php-8.2.9:femail-chroot-1.0p3: ok
php-8.2.9:libsodium-1.0.18p1: ok
php-8.2.9:argon2-20190702: ok
php-8.2.9:oniguruma-6.9.8: ok
php-8.2.9: ok
The following new rcscripts were installed: /etc/rc.d/php82_fpm
See rcctl(8) for details.
New and changed readme(s):
    /usr/local/share/doc/pkg-readmes/femail-chroot
    /usr/local/share/doc/pkg-readmes/php-8.2

php-8.2 - â!!

phpâ®è®

以äst Æâ€â€¾美:

$ ls /etc/php*
/etc/php-8.2.ini    /etc/php-fpm.conf

/etc/php-8.2:

/etc/php-8.2.sample:
opcache.ini

/etc/php-fpm.d:

kude5 / kude6âââ€

印度印第安人

vou了å

$ doas nvim /etc/php-8.2.ini

ç·é¾:

- post_max_size = 8M
+ post_max_size = 30M
  (...)
- upload_max_filesize = 2M
+ upload_max_filesize = 24M
  (...)
- allow_url_fopen = Off
+ ; for composer; disabled in php-fpm
+ allow_url_fopen = On

-

$ doas nvim /etc/php-fpm.conf

ä¾ - €«Å /¾«ä»¥ästR

+ ; set On in php.ini for composer, therefore:
+ php_admin_value[allow_url_fopen] = Off

ââ€â·â·§

/etc/php-8.2.sample‸®â€€ ·§ “€¾±±±¾±¾±¾±¾±ˆ ¾颁奖典礼 -

$ doas ln -sf /etc/php-8.2.sample/${ini} /etc/php-8.2/

- ¾è±â†¾美§§

$ # ksh の場合:
$ for x in $(ls /etc/php-8.2.sample/*); do doas ln -sf $x /etc/php-8.2/; done
$ # fish の場合:
$ for x in /etc/php-8.2.sample/*; doas ln -sf $x /etc/php-8.2/; end

php-fpmâ®威奥

是,houtouthoutounout - / P>

phpâpkg-preadmeâ€â€ - -

openbsd phpäst »â€€â¼££â¼€«th 今天有今天有El -El -el ä - rcctl(8)迷, â
to®èinate -ã

rcctl enable php82_fpm

rcctl start php82_fpm

§

$ doas rcctl enable php82_fpm

+ pkg_scripts=(...) php82_fpm (...)

§

$ doas rcctl start php82_fpm

ǵæ※¥äst

php82_fpm(ok)

æŧ

/var/www/etcà®è - 犯错(â·

§§§§çâ®®®®¢¢ª§§§ â¾-p>

/var/www/etcââ€et了⾧§§§®etc

$ ls -lR /var/www/etc
/var/www/etc:
total 16
-rw-r--r--  1 root  daemon   35 Aug 03 00:00 hosts
-r--r--r--  1 root  daemon  292 Aug 03 00:00 localtime
-rw-r--r--  1 root  daemon   99 Aug 03 00:00 resolv.conf
drwxr-xr-x  2 root  daemon  512 Aug 03 00:00 ssl/

/var/www/etc/ssl:
total 708
-r--r--r--  1 root  daemon  341121 Aug 03 00:00 cert.pem
-r--r--r--  1 root  daemon     745 Aug 03 00:00 openssl.cnf

web - ã¼

æ -âphpÅâweb -

thoupbsd - open

$ doas cp -p /etc/examples/httpd.conf /etc/

さて koude19 を更新して、fastcgi socket 定義を追加しましょう。SERVERS セクションに対して行います。以下のような感じです:

server "default" {
    listen on * port 80
    #listen on * port 443

    root "/htdocs"
    directory index index.php

    location "/*.php" {
        fastcgi socket "/run/php-fpm.sock"
    }
    location "/*.php[/?]*" {
        fastcgi socket "/run/php-fpm.sock"
    }
}

ã 必须冷19®Cold23â®® root "/htdocs" - root "/htdocs" §

Åstâ«an and -âand Mediaâ语言具有任何â -United United Airlines UA

$ ls -l /var/www/run
total 0
srw-rw----  1 www  www  0 Aug 03 00:01 php-fpm.sock=

-

ãµ¼¼¼迷,

$ echo "<?php phpinfo(1); ?>" | \
      doas tee "/var/www/htdocs/index.php" >> /dev/null
$ # delete it afterwards:
$ #doas rm /var/www/htdocs/index.php

§ ®实

php-82-on-openbsd-73

OpenBSD 7.3-
â€â€

快乐服务ðð