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 3 years have passed since last update.

【超初心者用】Laravel用のサーバーを起動する

Posted at

Apacheを使用しなくてもいい

Apacheは8000をリッスンしている。

Apacheを起動してブラウザにlocalhostを入力すると、ルートディレクトリを開くことになるので、設定しているファイルが開かれる。

自分の場合はtop.phpというファイルが開かれる。

Laravelを使うときにもサーバーをたちあげる必要あり

動画なので説明をみていると、MAMPを使っていたり、いきなりlocalhostにアクセスすることで

image.png

この画面が起動していましたが、自分はApacheを使用してサーバーを立ち上げていて、8000をlocalhostに設定していました。

なので当然上記の画面が表示されませんでした。

ポートを指定してサーバーを立ち上げる?!

ウェブ職人のためのPHPフレームワーク。というサイトにちゃんと便利なことも書いてありました。
http://laravel.jp/

image.png

$ php artisan serve --port=8080

後ろの--port=8080というのが8080をポート番号に指定するということらしい。
これにより、複数のサーバーを立てる場合はこのポート番号をかぶらないように指定すればいいみたいですね。

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?