apache - Can't get wampserver 2.5 accessible from a remote machine -


i desesperate wamp working!

i've installed wampserver 2.5 on win7 64bits machine.

in httdp.conf file, commented out line regarding vhosts:

include conf/extra/httpd-vhosts.conf 

the httpd-vhosts.conf contains:

<virtualhost *:80>     documentroot "c:/users/alain/dropbox/website/exemples/grafikart/petsy_alain.dev"     servername petsy.dev     serveralias www.petsy.dev     <directory "c:/users/alain/dropbox/website/exemples/grafikart/petsy_alain.dev">         options indexes followsymlinks multiviews         allowoverride         <requireany>             require local             require ip 192.168.1         </requireany>     </directory> </virtualhost> 

(i tried require granted)

i first installed wampserver 2.5 64 bits.

i able, local machine access http://petsy.dev when tried access http://192.168.1.16/petsy.dev other machine of lan, getting 403 error (forbidden):

[thu dec 04 14:43:08.519329 2014] [authz_core:error] [pid 11088:tid 776] [client 192.168.1.15:39975] ah01630: client denied server configuration: c:/users/alain/dropbox/website/exemples/grafikart/petsy_alain.dev [thu dec 04 14:43:08.635335 2014] [authz_core:error] [pid 11088:tid 776] [client 192.168.1.15:39975] ah01630: client denied server configuration: c:/wamp/www/favicon.ico 

i got access remotely petsy.dev when added in remote pc hosts file line:

192.168.1.16  petsy.dev 

in case, able, on remote machine, access server using 'http://petsy.dev'.

first don't understand change on server side , secondly cannot satisfied solution cannot use on smartphone.

as wasn't able find answer anywhere, tried install wampserver 2.5 32 bits!

same problem! different error:

i can access petsy.dev website locally now, when try access remotely, 404 error (not found) !!!

here access logs of apache local machine:

xxxx::7d1a:xxxx:9672:xxxx - - [05/dec/2014:19:22:25 +0100] "get / http/1.1" 200 40438 

from remote machine:

192.168.1.15 - - [05/dec/2014:19:22:30 +0100] "get /petsy.dev/ http/1.1" 404 295 

httpd -t answers syntax ok

httpd -s says:

virtualhost configuration: *:80                   namevirtualhost          default server localhost (c:/wamp/bin/apache/apache2.4.9/conf/extra/httpd-vhosts.conf:23)          port 80 namevhost localhost (c:/wamp/bin/apache/apache2.4.9/conf/extra/httpd-vhosts.conf:23)                  alias localhost          port 80 namevhost petsy.dev (c:/wamp/bin/apache/apache2.4.9/conf/extra/httpd-vhosts.conf:34)                  alias www.petsy.dev serverroot: "c:/wamp/bin/apache/apache2.4.9" main documentroot: "c:/wamp/www/" main errorlog: "c:/wamp/logs/apache_error.log" mutex rewrite-map: using_defaults mutex authdigest-client: using_defaults mutex default: dir="c:/wamp/bin/apache/apache2.4.9/logs/" mechanism=default mutex authdigest-opaque: using_defaults pidfile: "c:/wamp/bin/apache/apache2.4.9/logs/httpd.pid" define: dump_vhosts define: dump_run_cfg define: apache24=apache2.4 

please, please stupid error did make ????

you dont need <requireany> try this

<virtualhost *:80>     documentroot "c:/users/alain/dropbox/website/exemples/grafikart/petsy_alain.dev"     servername petsy.dev     serveralias www.petsy.dev     <directory "c:/users/alain/dropbox/website/exemples/grafikart/petsy_alain.dev">         options indexes followsymlinks multiviews         allowoverride         require local         require ip 192.168.1     </directory> </virtualhost> 

additional info dont think understand happening when create virtual hosts.

basically when apache see's has 1 or more virtual hosts configured, teling apache server more 1 domain name. important part in sentence more 1 domain name.

this causes apache examine domain name on each incoming connection. match domain name 1 of virtual hosts definitions , change documentroot and potentially other parameters set in virtual host.

so important thing use matching domain name in browser of other pc using apache domain name knows about.

this done dns server on real internet, while inside own local network i.e. safely behind router have use method. setup own local dns server, thats quite complicated.

so simple solution use hosts file on other pc's in network.

so on other pc (not pc running wampserver), edit \windows\system32\drivers\etc\hosts file , add this

192.168.1.16  petsy.dev 

then either reboot or reload windows dnscache

start command windows using "run administrator" , execute these 2 commands reload cache

net stop dnscache net start dnscache 

now can use correct domain name browser on non-wampserver pc so

http://petsy.dev 

and browser find petsy.dev lives on ip address 192.168.1.16. when connection made 192.168.1.16 using corretc domain name i.e. petsy.dev , apache find virtual host , set per vh config , server pages correct folder.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -