LoginSignup
24
21

More than 5 years have passed since last update.

VagrantでCentOS7環境構築してWebページみたらエラーになったとき

Posted at

vagrantfile上でconfig.vm.network "192.168.33.10"のコメントアウトを外して、ブラウザからアクセスしたところ、
ページが見つかりません。

環境構築はドットインストールさんのVagrant入門を参考にしてるので、詳しいところはそちらを確認ください。

動画みながら、同じように作業しましたが、
ブラウザからアクセスできません。

ミスしているのはfirewallを無効にする設定のようです。

$ sudo service iptables stop
Redirecting to /bin/systemctl stop  iptables.service

Failed to issue method call: Unit iptables.service not loaded.

CentOS7ではiptablesではなく、firewalldを使用するとのこと。

よって、上記コマンドではなく、下記コマンドを使用します。

$ sudo systemctl stop firewalld

これで、ブラウザから無事Hello worldをみることができました。

24
21
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
24
21