実現したいこと
検証環境でfml8をインストールし、Web管理画面を出そうと思ったのですが
Internal Server Errorにより全く動作しません。
fmlのWeb管理画面を表示させたいです。
前提
・Red Hat Enterprise Linux release 8.2 (Ootpa)
・fml8
ドメインはtest.localで設定、VirtualHostなし
/home/fml/public_html配下にcgiファイルを配置されている
・Apache2.4.37 (suexec有効化確認済み)
設定ファイルの中身
・fml8 (/usr/local/etc/fml/main.cf)
# # $FML: main.cf.in,v 1.20 2004/11/21 06:55:47 fukachan Exp $ # # fml version # This is important # Example: fml 8.0 # fml-current YYYYMMDD # fml-devel YYYYMMDD fml_version = current-20230113 fml_owner = fml fml_group = fml ### ### DIRECTORIES ### # Example: /usr/local prefix = /usr/local exec_prefix = ${prefix} datarootdir = ${prefix}/share # $config_dir holds the global main configuration and # several version-dependent default configurations # Example: /etc/fml config_dir = ${prefix}/etc/fml # Example: /etc/fml/defaults/$fml_version default_config_dir = $config_dir/defaults/$fml_version # group writable configuration directory. # prepared but not used by default. # This may be used by ml_home_prefix handling. # Example: /etc/fml/config.gw group_writable_config_dir = ${prefix}/etc/fml/config.gw # defined for convenience, for example, we need this variable
・Apache (/etc/httpd/conf/httpd.conf)
[root@fml01 conf]# grep -v "#" httpd.conf ServerRoot "/etc/httpd" Listen 80 Include conf.modules.d/*.conf User apache Group apache ServerTokens Prod TraceEnable Off FileETag MTime Size ServerAdmin root@localhost ServerName fml01.test.local <Directory /> AllowOverride none Require all denied </Directory> DocumentRoot "/home/fml/public_html" <Directory "/var/www"> AllowOverride None Require all granted </Directory> <Directory "/home/fml/public_html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> <IfModule dir_module> DirectoryIndex index.html </IfModule> <Files ".ht*"> Require all denied </Files> ErrorLog "logs/error_log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access_log" combined </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "/home/fml/public_html/" </IfModule> <IfModule mod_mime.c> AddHandler cgi-script .cgi </IfModule> <IfModule mime_module> TypesConfig /etc/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddHandler cgi-script .cgi AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> <IfModule mime_magic_module> MIMEMagicFile conf/magic </IfModule> EnableSendfile on IncludeOptional conf.d/*.conf
・userdir.conf (/etc/httpd/conf.d/userdir.conf)
[root@fml01 conf.d]# grep -v "#" userdir.conf <IfModule mod_userdir.c> UserDir public_html </IfModule> <Directory "/home/fml/public_html"> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI Require method GET POST OPTIONS </Directory>
発生している問題・エラーメッセージ
上記の設定で、http://192.168.XX.XX/~fml/cgi-bin/anonymous/test.local/elena/submit.cgi
にアクセスしたところ、以下のメッセージが出てしまいます。
# tail -f /var/log/httpd/error_log [cgid:error] [pid 17941:tid 140113904330496] [client 192.168.118.1:62206] End of script output before headers: submit.cgi, referer: http://192.168.XX.XX/~fml/cgi-bin/anonymous/test.local/elena/
journalctl -f Feb 14 02:27:38 fml01 suexec[18485]: uid: (1001/fml) gid: (1001/fml) cmd: submit.cgi Feb 14 02:27:38 fml01 suexec[18485]: failed to setgid (1001: submit.cgi)
試したこと
・.htaccessの設定変更
↓デフォルト
AuthName ByPassword AuthType Basic require valid-user AuthUserFile "/dev/null" ~
↓変更後
(コメントアウトしているものは、実際に書いてみて検証したが、動作しなかったもの)
AuthName ByPassword AuthType Basic require valid-user #AuthUserConfig "/usr/local/etc/fml/test.local/htpasswd" ##AuthUserFile "/dev/null" AuthUserFile "/usr/local/etc/fml/test.local/.htpasswd" ##Options +ExecCGI ##AddType application/x-httpd-cgi .cgi
・suexecの権限変更
↓デフォルト
-rwx--x--x. 1 root apache 21016 Dec 2 2019 suexec
↓変更後
-rwx--x--x. 1 root apache 21016 Dec 2 2019 suexec
設定変更するも動作せず。
補足情報
・suexecの確認
# suexec -V -D AP_DOC_ROOT="/var/www" -D AP_GID_MIN=1000 -D AP_HTTPD_USER="apache" -D AP_LOG_SYSLOG -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin" -D AP_UID_MIN=1000 -D AP_USERDIR_SUFFIX="public_html"
・/home/fml/public_html 以下のパーミッション
一旦すべてchmod 755 を実施しています。
Linux超初心者、初質問になりますので、至らぬ点がたくさんあるかと思いますが、
もし原因のわかる方いらっしゃったら、何卒ご教授ください。
よろしくお願いいたします。

あなたの回答
tips
プレビュー