ここで何が起こっているのか正確にはわかりませんが、権限に問題があると思います。私は症状を説明しようとしますが、うまくいけば誰かが治療を受けますか? EC2 インスタンスでウェブサイトを実行しようとしています。このガイドに従ってランプをインストールしました: https://gist.github.com/aronwoost/1105007。Web サイトでは、php、mysql、javascript を使用しています。PHPファイルからクエリを実行することでmysqlデータベースにアクセスできることがわかりましたが、正しく機能しないことがたくさんあります。
- 「include 'databaseinfo.php';」を使用すると、変数をインポートする代わりにファイルの内容が自動的に出力されるため、より安全な mysql クエリを作成できます。
- メインの index.html ファイルには、いくつかの php コードがあり、いくつかの html をエコーして実行しようとしますが、代わりに html は実際に実行されるのではなく、テキストとしてエコーされます。
編集: httpd.conf に対して行った唯一の変更は、このセクションです。
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All