LoginSignup
4
6

More than 5 years have passed since last update.

Vagrant エラーログの確認の仕方

Posted at

エラーログの確認の仕方

sudo tail -n 100 /var/log/httpd/error_log

このコマンドをvagrant上で打つとエラーログを確認できます!


[Thu Mar 14 11:26:50.224093 2019] [php7:emerg] [pid 4207] [client 192.168.33.10:48758] PHP Parse error: syntax error, unexpected '"place"' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /vagrant/scraping/api/hotels.php on line 10
[Thu Mar 14 11:32:24.043945 2019] [php7:emerg] [pid 4212] [client 192.168.33.1:59081] PHP Parse error: syntax error, unexpected '"place"' (T_CONSTANT_ENCAPSED_STRING), expecting ']' in /vagrant/scraping/api/hotels.php on line 10, referer: http://192.168.33.10/scraping/api/index.php


僕の場合はこのようなエラーログが出ました。

ちなみにエラー箇所としては、

自作のAPIのデータをvagrant上で、curlコマンドでGETしようとしたところ、

何も表示されず、エラーも表示されないという感じに。

[vagrant@localhost api]$ curl http://192.168.33.10/scraping/api/hotels.php?target_date=20190205\&place=osaka\&order=low\&list=10

こんな感じ↑でGETしようとした。

エラーログ確認したらすぐ解決できました〜。

4
6
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
6