drupal - Virtual host in apache on Mint VM doesn't work -
i have apache running on mint vm on windows 8 host can use vm drupal development. created virtualhost entry in /etc/apache2/apache2.conf
can use www.mysite.dev
development url, , set hosts
files on guest host machines. target platform deployment acquia, in case that's relevant.
the problem i'm having that, when use browser in guest go http://www.mysite.dev/
, site, when access http://www.mysite.dev/any-non-root-path
, 404. also, when use browser on host go http://www.mysite.dev
, instead apache default home page.
in /etc/apache2/apache2.conf
on guest, have:
<virtualhost www.mysite.dev:80> documentroot /var/www/html/mysite/docroot/ servername www.mysite.dev </virtualhost>
in /etc/hosts
on guest, have:
127.0.0.1 localhost 127.0.1.1 vm-name 127.0.0.1 www.my-site.dev # following lines desirable ipv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
in c:\windows\system32\drivers\etc\hosts
on host, have
127.0.0.1 localhost 192.168.44.44 www.drupal7.dev 192.168.44.45 www.mysite.dev
192.168.44.45 ip address of vm on host-only network created in virtualbox. (the 192.168.44.44 when trying vagrant, shared folder performance slow. figured instead of learning vagrant muck around, might skip straight muck!)
i suspect 2 issues i'm having related. question this: how can resolve these 2 issues content want both while browsing host , while browsing guest?
thanks!
edit specific error getting path issue the requested url [...] not found on server.
new answer: answer solves both problems.
<virtualhost 192.168.44.45 127.0.0.1> documentroot /var/www/html/site-name servername www.site-name.dev <directory "/var/www/html/site-name/docroot/"> allowoverride </directory> </virtualhost>
so that's answer, mr. spock!
original answer fresh monday morning got me part of answer. guess 2 questions.
the fix non-root url add directory element. see https://www.drupal.org/node/1038.
<virtualhost www.site-name.dev:80> documentroot /var/www/html/site-name servername www.site-name.dev <directory "/var/www/html/site-name/docroot/"> allowoverride </directory> </virtualhost>
i'm still looking other part.
Comments
Post a Comment