質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

386閲覧

vagrantfileの編集について

mango

総合スコア33

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2018/09/20 06:57

前提・実現したいこと

ローカル開発環境とブラウザを接続

発生している問題・エラーメッセージ

vim vagrantfile で # config.vm.network “forwarded_port”, guest: 80, host: 8080の部分をコメントアウトしたいが、そもそも # config.vm.network “forwarded_port”, guest: 80, host: 8080の文字が出てこない。

該当のソースコード

-- mode: ruby --

vi: set ft=ruby :

All Vagrant configuration is done below. The "2" in Vagrant.configure

configures the configuration version (we support older styles for

backwards compatibility). Please don't change it unless you know what

you're doing.

Vagrant.configure("2") do |config|

The most common configuration options are documented and commented below.

For a complete reference, please see the online documentation at

https://docs.vagrantup.com.

Every Vagrant development environment requires a box. You can search for

boxes at https://vagrantcloud.com/search.

config.vm.box = "centos/7"

Disable automatic box update checking. If you disable this, then

boxes will only be checked for updates when the user runs

vagrant box outdated. This is not recommended.

config.vm.box_check_update = false

Create a forwarded port mapping which allows access to a specific port

within the machine from a port on the host machine. In the example below,

accessing "localhost:8080" will access port 80 on the guest machine.

"vagrantfile" 70L, 3013C

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2018/09/20 07:02

質問の意味がわかりません。やりたいことと問題点が分からないのでより詳細に書いて下さい。
guest

回答1

0

自己解決

control+dでスクロールしてコメントアウトできました

投稿2018/09/21 08:50

mango

総合スコア33

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問