Re: Re: Conditional .htaccess

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

 



Ah ha, very nice idea. As long as my sites are not relying on the hostname, which I rarely every use src=http://example.com/file.foo and use src=/file.foo, then I should be ok.

Thanks, I never thought about approaching it that way, good idea.
--
Scott * If you contact me off list replace talklists@ with scott@ *

On Oct 19, 2009, at 4:39 PM, LuKreme wrote:

On 19-Oct-2009, at 17:23, Scott Haneda wrote:
php admin value and php flag values, I would like to only be enabled for my IP address, but publicly, I want them off, so the public does not see errors, only I do.

I think the way to do this is to setup a different location.

Something like this (this is for webdav, but the idea is the same):

<VirtualHost *>
  ServerName www.example.com
  ServerAlias example.com
  DocumentRoot /usr/home/ksmith/http/
  CustomLog /home/ksmith/logs/site.log combined
  ErrorLog /home/ksmith/logs/site_error.log
</VirtualHost>


<virtualhost *>
  ServerName webdav.example.com
  DocumentRoot /usr/home/ksmith/http/
  DavLockDB /tmp/DavLock.example
  CustomLog /home/ksmith/logs/sitedav.log combined
  ErrorLog /home/ksmith/logs/site_daverror.log
  <location />
        DAV On
        AuthType Basic
        AuthName "Example.com DAV"
        AuthUserFile /home/ksmith/.htdavpass
        #AllowOverride All
        ForceType text/plain
        require valid-user
   </location>
</virtualhost>

notice the two virtualhosts are pointing at the same content.

You would do something similar to create a, say, phpadmin.example.com that turned on the directives you wanted:

<virtualhost *>
  ServerName phpa.example.com
  DocumentRoot /usr/home/ksmith/http/
  php_flag display_errors on
</virtualhost>

---------------------------------------------------------------------
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