centos8で.htmlや.htmのファイルでphpを動かす
htmlのファイルにphpを書いて
次のファイルを開こうとしています、と出る場合。
phpの設定ミスです。
モジュール版phpからfpm版phpになったようです?
centos7までの方法ではなく、centos8では/etc/http/conf.d/php.confの
<FilesMatch \.(php|phar)$>
SetHandler application/x-httpd-php
</FilesMatch>
の部分を、
<FilesMatch \.(php|phar|html|htm)$>
SetHandler application/x-httpd-php
</FilesMatch>
に書き換えたら.htmlや.htmのファイルにphp組み込みでもphpが動作するようです。
自己責任で。
パソコンや開発、Linuxやデータベースのことなど
git rmで怒られた場合
git rm ファイル名 で error: the following file has local modifications と怒られた場合
git rm --cached ファイル名
git rm ファイル名 で error: the following file has local modifications と怒られた場合
git rm --cached ファイル名
centos7で自動起動するカーネルを設定
現在の起動カーネル確認
grub2-editenv list
起動に使用できるカーネルの一覧を表示
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
例えば上から3番目のカーネルで起動したい場合
grub2-set-default 2
設定を保存
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
再起動してチェック
環境によりコマンドが変わるかもしれないので自己責任で
現在の起動カーネル確認
grub2-editenv list
起動に使用できるカーネルの一覧を表示
awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg
例えば上から3番目のカーネルで起動したい場合
grub2-set-default 2
設定を保存
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
再起動してチェック
環境によりコマンドが変わるかもしれないので自己責任で