
Hi, I installed centOS6 on a vagrant virtual machine and also installed httpd and php.
But when I try to access http://192.168.33.10 , which is the ip address set in Vagrantfile, I cannot open the web page.
I made several files in the / var / www / html directory.
$ cd /var/www/html/
$ ls
index.html test.php
Here I changed the setting in Vagrantfile
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "192.168.33.10"
httpd is active
$ which httpd
/usr/sbin/httpd
[vagrant@localhost ~]$ sudo service httpd status
Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: active (running) since Sun 2016-05-08 18:44:38 EDT; 53s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 3180 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─3180 /usr/sbin/httpd -DFOREGROUND
├─3181 /usr/sbin/httpd -DFOREGROUND
├─3182 /usr/sbin/httpd -DFOREGROUND
├─3183 /usr/sbin/httpd -DFOREGROUND
├─3184 /usr/sbin/httpd -DFOREGROUND
└─3185 /usr/sbin/httpd -DFOREGROUND
May 08 18:44:37 localhost.localdomain httpd[3180]: AH00558: httpd: Could not reliably determine the server fully qualifie...ssage
May 08 18:44:38 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
I know little about networking.
How can I fix this problem? Can anyone teach me!
MORE INFO - Full Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "centOS70_64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "192.168.33.10"
end
FURTHER INFORMATION - What do I get when doing strollers.
% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 8080 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.14
default: VirtualBox Version: 5.0
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/Hayato/Dropbox/vagrant/centOS65
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
user5809117
source
share