1) *actual situation:*
   httpd.conf
      WSGIScriptAlias /wsgi      c:/Apache24/htdocs/hello.wsgi
      WSGIScriptAlias /myapp_w   c:/Apache24/wsgi-scripts/myapp.wsgi
      WSGIScriptAlias /hellowsgi c:/Apache24/wsgi-scripts/hello.wsgi
   browser:
       http://www.vm1w8.com            -> "It works!"
       http://www.vm1w8.com/wsgi       -> "Hello World!"
       http://www.vm1w8.com/hellowsgi  -> Forbidden - You don't have 
permission to access /hellowsgi on this server
       http://www.vm1w8.com/myapp_w    -> Forbidden - You don't have 
permission to access /myapp_w on this server
2) *made the following changes*
   - stop Apache
   - exchange of the directory names c:/Apache24/htdocs/ <-> 
c:/Apache24/wsgi-scripts/
      - rename from  c:/Apache24/htdocs/               to  
c:/Apache24/htdocs_wsgi-scripts/
      - rename from  C:/Apache24/wsgi-scripts/         to  
c:/Apache24/htdocs/
      - rename from  c:/Apache24/htdocs_wsgi-scripts/  to  
c:/Apache24/wsgi-scripts/
   - restart Apache
   browser:
       http://www.vm1w8.com            -> Forbidden - You don't have 
permission to access / on this server
this is due to the fact that in the default folder "htdocs" (formerly 
"wsgi-scripts") is missing the file "index.html"note: the message "You 
don't have permission to access..." can lead misunderstandings
       http://www.vm1w8.com/wsgi       -> "Hello World!"
       http://www.vm1w8.com/hellowsgi  -> "Hello World!" (now works!)
       http://www.vm1w8.com/myapp_w    -> The requested URL /myapp_w was 
not found on this server
in effect the "myapp.wsgi" file is not present in "wsgi-script" directory 
(formerly "htdocs") 
3) *then copied the file*
   from c:/Apache24/wsgi-scripts/index.html   to   
c:/Apache24/htdocs/index.html
   browser:
       http://www.vm1w8.com            -> "It works!"
4) and copied the file
   from c:/Apache24/htdocs/myapp.wsgi    to   
c:/Apache24/wsgi-scripts/myapp.wsgi
   browser:
       http://www.vm1w8.com/myapp_w    -> "hello world"



*Note: with the exchange of directory name ("htdocs"<->"wsgi-scripts") and 
with      "Not touch any ownership of permissions on the directories or 
files"      all the "url" work properly....*

5)* do rollback (thinking of recreating the previous situation for to make 
a countercheck)*
   a) delete file c:/Apache24/wsgi-scripts/myapp.wsgi (rollback step 4))
      browser:
          http://www.vm1w8.com/myapp_w    -> The requested URL /myapp_w was 
not found on this server
   b) delete file: c:/Apache24/htdocs/index.html (rollback step 3))
      browser:
       http://www.vm1w8.com            -> Forbidden - You don't have 
permission to access / on this server
   c) rollback exchange of the directory names(c:/Apache24/htdocs/ <-> 
c:/Apache24/wsgi-scripts/)
      (rollback step 2))
      - exchange of the directory names(c:/Apache24/htdocs/ <-> 
c:/Apache24/wsgi-scripts/)
         - rename from  c:/Apache24/htdocs/               to  
c:/Apache24/htdocs_wsgi-scripts/
         - rename from  C:/Apache24/wsgi-scripts/         to  
c:/Apache24/htdocs/
         - rename from  c:/Apache24/htdocs_wsgi-scripts/  to  
c:/Apache24/wsgi-scripts/
      - stop Apache (note: I forgot to run the "stop Apache" at the 
beginning of this step, before exchange of the directory names)
      - restart Apache
   browser:
       http://www.vm1w8.com            -> "It works!"
       http://www.vm1w8.com/wsgi       -> "Hello World!"
       http://www.vm1w8.com/hellowsgi  -> "Hello World!" (??? - previously 
not working)
       http://www.vm1w8.com/myapp_w    -> "Hello World!" (??? - previously 
not working)

*Note: I can not understand why with the exchange of directory name *
*("htdocs"<->"wsgi-scripts")*
*all the "url" work properly (aftercopying the missing files) and why 
recreating the previous*
*situation all the urls still work properly ...*

*I repeated access to the "URL" after cleaning the browser cache, with 
another browser,but with the same result*
Can You help me to understand?
thanks

dcm






Il giorno giovedì 25 dicembre 2014 23:41:15 UTC+1, Graham Dumpleton ha 
scritto:
>
> Normally the error:
>
>     client denied by server configuration
>
> in the Apache error log for that Forbidden error would indicate that the 
> issue is in the Apache configuration, as opposed to for example the user 
> that the Apache server runs as not being able to access the 
> directories/files.
>
> Just to make sure it isn't something related to filesystem permissions, do 
> the following:
>
> 1) Rename the directory:
>
>     c:/Apache24/
>
> to:
>
>     c:/Apache24/tmp
>
> 2) Rename the directory:
>
>     c:/Apache24/wsgi-scripts
>
> to:
>
>     c:/Apache24/
>
> 3) Rename the directory:
>
>     c:/Apache24/tmp
>
> to:
>
>     c:/Apache24/wsgi-scripts
>
> 4) Restart and access the URLs:
>
>     http://www.vm1w8.com/wsgi
>
> and:
>
>     http://www.vm1w8.com/hellowsgi
>
> In other words, swap the htdocs and wsgi-scripts directories around. Not 
> touch any ownership of permissions on the directories or files.
>
> Graham
>
> On 22/12/2014, at 1:07 PM, marco del corto <[email protected] 
> <javascript:>> wrote:
>
> 1)    "...Can you also explain how you are starting up Apache?..."
> Apache is Running as a Windows Service and start automatically at system 
> startup. When I need stop and restart Apache, I use "Apache Service 
> Monitor" console that has Start/Stop/Restart button.
> 2)    The following "include" was retained commented:
> #Include conf/extra/httpd-vhosts.conf
> 3)    "...Also specifically indicate whether you have any further 
> VirtualHost definitions in the same Apache configuration which occur before 
> this one you have created..." -> no, there aren't others Virtualhost 
> definitions
> 4)    the Virtualhost definitions was done following
> https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide (at the 
> bottom of the paragraph "Mounting The WSGI Application") and was put at the 
> end of httpd.conf
> 5) with reference to the original Apache configuration file that came with 
> the ApacheLounge distribution, I have modified only the following points
> - LoadModule wsgi_module modules/mod_wsgi.so (definition added)
> - Options (added ExecCGI)
> - AddHandler wsgi-script .wsgi (definition added)
> - WSGIScriptAlias /wsgi c:/Apache24/htdocs/hello.wsgi (definition added)
> - AddHandler cgi-script .cgi .py (added ".py")
> - VirtualHost definition (as described in my previous mail)
> 6)    As suggested I tried http://www.vm1w8.com/hellowsgi and got
> Forbidden
> You don't have permission to access /hellowsgi on this server
> 7)    While with http://www.vm1w8.com I got "It works!"  (from default 
> apache index.html)
> 8)    "...Also eliminate the VirtualHost container and define those extra 
> bits outside of the context of ant VirtualHost..."
>    I followed this steps:
> - eliminated VirtualHost
> - moved outside the definitions (that was inner to the VirtualHost):
> <Directory C:/Apache24/wsgi-scripts>
> Require all granted
> </Directory>
> WSGIScriptAlias /myapp_w C:/Apache24/wsgi-scripts/myapp.wsgi
> WSGIScriptAlias /hellowsgi c:/Apache24/wsgi-scripts/hello.wsgi
> 9) then, after Apache restart I got:
>    http://www.vm1w8.com
> -> "It works!"
>    http://www.vm1w8.com/wsgi
> -> Hello World!
>    http://www.vm1w8.com/hellowsgi
> -> Forbidden - You don't have permission to access /hellowsgi on this 
> server
>    http://www.vm1w8.com/myapp_w
> -> Forbidden - You don't have permission to access /myapp_w on this server
>    and in the error.log was present the message:
>    "AH01630: client denied by server configuration: 
> C:/Apache24/wsgi-scripts"
> do you have any idea?
> thanks
> dcm
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to