4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

XAMPPの設定あれこれ。

Last updated at Posted at 2014-04-09

よくわからないXAMPP周りのエラーを直してもらったのでメモ。

Apacheがエラーでてつなげないとき

まずはコマンドプロンプトを管理者権限で起動

Windows8の場合、コマンドプロンプトを管理者として実行したい場合
1.「Windows」キーを押しながら「X」キー
2. クイックアクセスメニューから「コマンドプロンプト(管理者)」をクリック

起動したらこれ↓を打つ。

taskkill /f /im httpd.exe

これでStartし直すと起動するようになるっぽい。
管理者権限で起動せず、ふつうの黒い画面で打つとアクセスが拒否されるので注意。

htmlでPHPを動作させたい場合の設定

C:\xampp\apache\conf にある
httpd.conf の ~ 内に↓を追加

AddType application/x-httpd-php .php .html

.htaccessによるアクセス制限

外部からはアクセスできないように設定する。
.htaccess ファイルを作成し↓を記述

Order deny,allow
Deny from All
Allow from localhost 127.0.0.1

作成したファイルを C:\xampp\htdocs に置いておけばOK

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?