Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

vmで起動したサーバへ接続できない

問題

vm上にcentos7をいれてapacheを起動させ、ホストOSから80番ポートへアクセス出来ない

curl 192.168.33.10
curl: (7) Failed to connect to 192.168.33.10 port 80: Connection refused

curlでゲストOSにつなげると80番ポートが開いてないとでてくるので、firewallまわりのポートの設定が怪しいと想い調べる
http://superuser.com/questions/914652/connection-refused-for-port-80-in-virtualbox-but-only-for-centos-vm

こちらによるとcentos7の設定でfirewallがデフォルトでonになっていたのでoffにすればよいとのことだが、全部offにするのは良くないので
80portだけあける設定を行う

sudo lokkit -s http

これで80番ポートが開いて接続可能になる

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What are the problem?