virtualbox - can't see my virtual host entries in virtual box - Ask Ubuntu


i'm experimenting bash program built creates virtual hosts in apache , sets relevant system files /etc/hosts, /etc/apache2/hosts-available/*.conf, create user's home, php.ini etc.

so far runs , can see suexec users when typing test1/index.php or test2/index.php etc.

i decided move onto vbox (ubuntu server) , run script completed successfully. managed find apache start page @ http://192.168.56.1:2222/ (now doubt if guest or host apache! either way edited message in both machines know am!) set guest's network properties this:

vbox network 1 vbox network 2

immediately noticed couldn't see virtual hosts unless editing vhost file , made him default sudo apache2ctl -s showed me (but all users showed one)!

a typival vhost file:

#namevirtualhost *:80  <virtualhost *:80>   servername test   serveralias test   serveradmin test@test.com   documentroot /home/test/public_html/  <ifmodule mod_fcgid.c>   suexecusergroup test test   <directory /home/test/public_html/>     options +execcgi     options -indexes     allowoverride none     addhandler fcgid-script .php     fcgiwrapper /home/suexec/test/cgi-bin/php-fcgi-wrapper .php     require granted   </directory> </ifmodule>    loglevel debug   errorlog /home/test/log/apache_error.log   customlog /home/test/log/apache_access.log combined   serversignature off  </virtualhost> 

my first thought guest's ufw decided start playing it. make long story short, can't see apache's default page typing in host: http://192.168.56.1:2222/ if try sudo ufw disable or sudo ufw reset or sudo ufw allow 10.0.2.15 (at guest). please note http://192.168.56.1/ shows host apache.

the web page shows:

ssh-2.0-openssh_7.2p2 ubuntu-4ubuntu2.1 protocol mismatch. 

my host's ifconfig:

eno1      link encap:ethernet  hwaddr 5c:26:0a:5f:f9:f0             inet addr:192.168.1.1  bcast:192.168.1.255  mask:255.255.255.0           inet6 addr: fe80::3e4b:4e1d:c7a2:c4e4/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:102930 errors:0 dropped:0 overruns:0 frame:0           tx packets:110273 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:69360918 (69.3 mb)  tx bytes:21795276 (21.7 mb)           interrupt:20 memory:e2e00000-e2e20000   lo        link encap:local loopback             inet addr:127.0.0.1  mask:255.0.0.0           inet6 addr: ::1/128 scope:host           loopback running  mtu:65536  metric:1           rx packets:23108 errors:0 dropped:0 overruns:0 frame:0           tx packets:23108 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            rx bytes:2514772 (2.5 mb)  tx bytes:2514772 (2.5 mb)  vboxnet0  link encap:ethernet  hwaddr 0a:00:27:00:00:00             inet addr:192.168.56.1  bcast:192.168.56.255  mask:255.255.255.0           inet6 addr: fe80::800:27ff:fe00:0/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:0 errors:0 dropped:0 overruns:0 frame:0           tx packets:65 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:0 (0.0 b)  tx bytes:11332 (11.3 kb) 

my guest's ifconfig:

magellan@cent:~$ ifconfig enp0s3    link encap:ethernet  hwaddr 08:00:27:4b:16:87             inet addr:10.0.2.15  bcast:10.0.2.255  mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe4b:1687/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:4991 errors:0 dropped:0 overruns:0 frame:0           tx packets:3027 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:407687 (407.6 kb)  tx bytes:356072 (356.0 kb)  lo        link encap:local loopback             inet addr:127.0.0.1  mask:255.0.0.0           inet6 addr: ::1/128 scope:host           loopback running  mtu:65536  metric:1           rx packets:7 errors:0 dropped:0 overruns:0 frame:0           tx packets:7 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            rx bytes:349 (349.0 b)  tx bytes:349 (349.0 b) 

at moment ufw @ guest shows these:

magellan@cent:~$ grep 'default_' /etc/default/ufw default_input_policy="drop" default_output_policy="accept" default_forward_policy="drop" default_application_policy="skip"  magellan@cent:~$ sudo ufw status numbered status: active 

any ideas can do?

i managed access apache default page in guest doing this:

  1. i dropped guest connections , created new 1 host-only (file -> preferences -> network -> host-only networks -> create)
  2. then, @ guest's settings -> network -> adapter 1, attached to: host-only).

from guest's ifconfig

magellan@g3site001:~$ ifconfig enp0s3    link encap:ethernet  hwaddr 08:00:27:4b:16:87             inet addr:192.168.56.101  bcast:192.168.56.255  mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe4b:1687/64 scope:link           broadcast running multicast  mtu:1500  metric:1           rx packets:6460 errors:0 dropped:0 overruns:0 frame:0           tx packets:5096 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:590863 (590.8 kb)  tx bytes:2738709 (2.7 mb)  lo        link encap:local loopback             inet addr:127.0.0.1  mask:255.0.0.0           inet6 addr: ::1/128 scope:host           loopback running  mtu:65536  metric:1           rx packets:7 errors:0 dropped:0 overruns:0 frame:0           tx packets:7 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1            rx bytes:349 (349.0 b)  tx bytes:349 (349.0 b) 

i can access default page http://192.168.56.101/ still, cannot access hosts http://192.168.56.101/suexec-test/index.php or http://192.168.56.101/test/index.php etc. ???

the requested url /suexec-test/index.php not found on server. 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User