RE: apache configuration: always go to parent directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: J. Bakshi [mailto:joydeep@xxxxxxxxxxxxxxx] 
> 
> 
> ##apache config
> 
> ``````````````````````````````````
> Alias /personal/joydeep  /var/personal_work_area/joydeep
> 
> DocumentRoot  /var/personal_work_area/
> 
>         <Directory /var/personal_work_area/joydeep/>
>                 DirectoryIndex index.php
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride All
>                 Order allow,deny
>                 allow from all
>         </Directory>
> `````````````
> 
> There is a folder called test with a .htaccess  inside 
> /var/personal_work_area/joydeep  folder
> The test folder has  .htaccess ; alice.html  and  bob.html
> 
> `````````````
> Options +FollowSymLinks
> #<IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteRule ^alice.html$ bob.htm
> ```````````````````
> 
> When I visit http://192.168.1.1/personal/joydeep/test/alice.html I get
> error as
> 
> ````
> The requested URL /index.php was not found on this server.
> ````
> 
> Here is the log
> 
> ````
> [Thu Nov 12 15:47:49 2009] [debug] mod_deflate.c(632): [client
> 192.168.1.100] Zlib: Compressed 366 to 278 : URL /index.php
> [Thu Nov 12 15:47:50 2009] [error] [client 192.168.1.100] script
> '/var/www/index.php' not found or unable to stat

So the server has its docroot set to /var/www. That means it is not using the config above.

> [Thu Nov 12 15:47:50 2009] [debug] mod_deflate.c(632): [client
> 192.168.1.100] Zlib: Compressed 366 to 278 : URL /index.php
> [Thu Nov 12 15:47:50 2009] [error] [client 192.168.1.100] script
> '/var/www/index.php' not found or unable to stat
> [Thu Nov 12 15:47:50 2009] [debug] mod_deflate.c(632): [client
> 192.168.1.100] Zlib: Compressed 366 to 278 : URL /index.php
> ````
> 
> Though everything is working well if I put test folder inside /var/www
> folder.
> 
> Here is my main configuration ( separate file)  for /var/www

Aha... You are using virtual hosts. This VH below is effectively your main server. All requests will go here (unless they don't match *:80 at TCP/IP).

Under what circumstances do you expect requests to go to the /var/personal_work_area/ docroot? Once you decide, you need to move the directives to a VH and set it up to receive that traffic (eg, you may want to use a name-based VH).

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> ```````````````````
> <VirtualHost *:80>
>         ServerAdmin webmaster@localhost
> 
>         DocumentRoot /var/www
>         <Directory />
>                 Options FollowSymLinks
>                 AllowOverride All
>         </Directory>
>         <Directory /var/www/>
>                 Options Indexes FollowSymLinks MultiViews
>                 AllowOverride All
>                 Order allow,deny
>                 allow from all
>         </Directory>
> 
> 
> DirectoryIndex index.php index.html
> 
>         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>         <Directory "/usr/lib/cgi-bin">
>                 AllowOverride All
>                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>                 Order allow,deny
>                 Allow from all
>         </Directory>
> 
>         ErrorLog /var/log/apache2/error.log
> 
>         # Possible values include: debug, info, notice, warn, 
> error, crit,
>         # alert, emerg.
>         LogLevel debug
> 
>         CustomLog /var/log/apache2/access.log combined
> 
>     Alias /doc/ "/usr/share/doc/"
>     <Directory "/usr/share/doc/">
>         Options Indexes MultiViews FollowSymLinks
>         AllowOverride None
>         Order deny,allow
>         Deny from all
>         Allow from 127.0.0.0/255.0.0.0 ::1/128
>     </Directory>
> 
> </VirtualHost>
> ``````````````````````````
> 
> Please ask if you need more info.
> 
> Thanks
> -- 
> জয়দীপ বক্সী
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. 
The sender's company reserves the right to monitor all e-mail communications through their networks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux