logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: VirtualHost access denied from network
Author
Otomatic



Joined: 01 Sep 2011
Posts: 213
Location: Paris, France, EU

PostPosted: Mon 14 Dec '15 15:56    Post subject: VirtualHost access denied from network Reply with quote

Hi,


Windows 7 Pro 64bit
Apache 2.4.18 (It was the same for Apache 2.4.17)

-- configuration file httpd.conf

Code:
ServerRoot "j:/wamp/bin/apache/apache2.4.18"
Listen 0.0.0.0:80
Listen [::0]:80
ServerName localhost:80
<Directory />
  AllowOverride none
  Require all denied
</Directory>

HostnameLookups Off

DocumentRoot "j:/wamp/www"
<Directory "j:/wamp/www/">
  Options +Indexes +FollowSymLinks +Multiviews
  AllowOverride all
  Require local
</Directory>

Include conf/extra/httpd-vhosts.conf


--- In httpd-vhosts.conf (Not all VirtualHost)

Code:
<VirtualHost *:80>
   ServerName localhost
   DocumentRoot J:/wamp/www
   <Directory  "J:wamp/www/">
      Options +Indexes +FollowSymLinks +MultiViews
      AllowOverride All
      Require local
   </Directory>
</VirtualHost>

<VirtualHost *:80>
   ServerName phottello
   DocumentRoot G:/www/phottello
  <Directory "G:/www/phottello/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride all
    Require all granted
  </Directory>
</VirtualHost>


All things work well with local access, like http://phottello/ but when I want to access by local network from a device 192.168.0.15, I have error :
Forbidden
You don't have permission to access to /phottello/ on this server

The connection is good, because in Apache error log I have
[Sun Dec 13 18:08:41.700046 2015] [authz_core:error] [pid 6476:tid 828] [client 192.168.0.15:55651] AH01630: client denied by server configuration: J:/wamp/www/phottello

I don't understand this error.
I don't understand why there is "J:/wamp/www/phottello" in the error log as the DocumentRoot is defined as "G:/www/phottello".
Back to top
Otomatic



Joined: 01 Sep 2011
Posts: 213
Location: Paris, France, EU

PostPosted: Tue 15 Dec '15 18:11    Post subject: Reply with quote

Another thing I don't understand:
In httpd.conf, I put:
<Directory "j:/wamp/www/">
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Require all granted
</Directory>

The error is not 403 but 404, not found !

With Require all granted for j:/wamp/www/ :
192.168.0.15 - - [15/Dec/2015:09:59:27 +0100] "GET /phottello/ HTTP/1.1" 404 296

With Require local for j:/wamp/www/
192.168.0.15 - - [15/Dec/2015:10:01:46 +0100] "GET /phottello/ HTTP/1.1" 403 307
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Wed 16 Dec '15 23:19    Post subject: Reply with quote

Does "phottello" have the correct DNS resolution. On the machine where the browser runs, what comes up when you do

Code:

nslookup phottello


inside a command line window?

Does it resolve properly to an IP address. Does the same resolution work on the server side?
Back to top


Reply to topic   Topic: VirtualHost access denied from network View previous topic :: View next topic
Post new topic   Forum Index -> Apache