vagrantで入れたamazon linux2でphp8.1をapacheで動作させたいです。
※httpdのバージョンは2.4になります。
vagrantでamazon linux2の環境を構築して下記コマンドでphp8.1を入れた所、
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum -y install yum-utils sudo yum -y repolist sudo yum-config-manager --disable 'remi-php*' sudo yum-config-manager --enable remi-php81 sudo yum -y install php81 sudo yum -y install php81-php-{cli,fpm,mysqlnd,devel,gd,mbstring,curl,xml,pear,bcmath,json,opcache,ldap} sudo ln -s /usr/bin/php81 /usr/bin/php
index.phpがソースのままダウンロードされてしまいました。
apacheのhttpd.conf等の設定で何か不足しているのでしょうか?
どなたか御存知でしたら御教示頂けますと幸いです。
■備考
下記でphp8.0のインストールの場合は正常にindex.phpが表示されました。
sudo amazon-linux-extras enable php8.0
■httpd.conf は下記のようになっています。
ServerRoot
1 2Listen 80 3 4Include conf.modules.d/*.conf 5 6User apache 7Group apache 8 9ServerAdmin root@localhost 10 11<Directory /> 12 AllowOverride none 13 Require all denied 14</Directory> 15 16DocumentRoot "/var/www/html" 17 18<VirtualHost *:80> 19 DocumentRoot "/var/www/html/test" 20</VirtualHost> 21 22<Directory "/var/www"> 23 AllowOverride None 24 Require all granted 25</Directory> 26 27<Directory "/var/www/html"> 28 Options Indexes FollowSymLinks 29 30 AllowOverride None 31 32 Require all granted 33</Directory> 34 35<IfModule dir_module> 36 DirectoryIndex index.html 37</IfModule> 38 39<Files ".ht*"> 40 Require all denied 41</Files> 42 43ErrorLog "logs/error_log" 44 45LogLevel warn 46 47<IfModule log_config_module> 48 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 49 LogFormat "%h %l %u %t \"%r\" %>s %b" common 50 51 <IfModule logio_module> 52 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 53 </IfModule> 54 55 CustomLog "logs/access_log" combined 56</IfModule> 57 58<IfModule alias_module> 59 60 ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" 61 62</IfModule> 63 64<Directory "/var/www/cgi-bin"> 65 AllowOverride None 66 Options None 67 Require all granted 68</Directory> 69 70<IfModule mime_module> 71 TypesConfig /etc/mime.types 72 73 AddType application/x-compress .Z 74 AddType application/x-gzip .gz .tgz 75 AddType application/x-httpd-php .php 76 AddType application/x-httpd-php-source .phps 77 AddType text/html .shtml 78 AddOutputFilter INCLUDES .shtml 79</IfModule> 80 81AddDefaultCharset UTF-8 82 83<IfModule mime_magic_module> 84 MIMEMagicFile conf/magic 85</IfModule> 86 87EnableSendfile off 88 89IncludeOptional conf.d/*.conf
回答1件
あなたの回答
tips
プレビュー