Forum Moderators: phranque

Message Too Old, No Replies

Apache - some pages denied

         

meiilax

8:49 pm on Sep 30, 2012 (gmt 0)

10+ Year Member



Hi,

I'm frustrated, a spent a day finding solution, but problem still not fixed. I have new home PC with Win7. I installed Apache 2.2 and PHP, it works, some pages from my developmet works fine, but some is not showed. In Apache error log I get something like this

client denied by server configuration: C:/web/My Webs/lomnice_2011/.htaccess, referer: http://localhost/


In apache conf I have

<Directory />
Options All Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Deny from none
</Directory>

<Directory "C:/web/My Webs">
Options All Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Another strangely is - for example - url

http://localhost/BeCart_ES/index.php?route=product/category&path=18


works, and

http://localhost/BeCart_ES/index.php?route=product/category&path=20


doesn't work an page is not showed..

I use another 2 computers, laptop with WinXP and PC in my occupation, both have the same apache configuration files as in my new pc, and everything works without problems. Does anyone know, where is problem ?

Thanks Milan

lucy24

10:04 pm on Sep 30, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another strangely is - for example - url

{snip}/index.php?route=product/category&path=18

works, and

{snip}/index.php?route=product/category&path=20

doesn't work an page is not showed.

Unless there's something in your config file about query strings, this one can only be due to your php script. If you can't pin it down, there's a php forum next door.

Tangentially:
<Directory />
Options All Indexes FollowSymLinks
AllowOverride All

I hope you are just doing this for local testing purposes. Apache says very strongly [httpd.apache.org] that you should never have "AllowOverride All" in this location.

Will the real site be on your own server or shared? It's a good idea to replicate the "real" site. So even if you've got a pseudo-server now, put all your rules in htaccess if that's where they will end up. Conversely if you will have a complete server, restrict overrides or block them completely, since you won't need them. Use <Directory> sections instead.

meiilax

10:44 pm on Sep 30, 2012 (gmt 0)

10+ Year Member



Maybe this problem is related to files a folder rights and its owner and Win7 user setting.. I copied php files from usb flash - there were copied from another pc.. But i'm logged as admin.. What do you think ?