[users@httpd] Complex combination of Allow and Deny for Apache

2015-06-08 Thread mathieu700
Hello 

With Apache, I searched to deny access to all *.php URL in a subdirectory. I 
succeed with this in .htaccess :
***
Order deny,allow
Allow from All

Files ~ ^.*\.php$
Deny from All
/Files
***

But now, I want to add a extra access for one single URL who was denied. I made 
a lot of test but a obtained only no effect or error 500 for example with 
this :
***
Order deny,allow
Allow from All

Directory /home/site/www/repertoire1/repertoire2/
Files fichier.php
Allow from All
/Files
/Directory

Files ~ ^.*\.php$
Deny from All
/Files
***

this .htaccess is in repertoire1 and the URL I want to allow is 
http://example.com/repertoire1/repertoire2/fichier.php
I cannot put files in the directory repertoire2 then I want to put all access 
rules in one single .htaccess file


Thank you for everyone that can help me to understand how the access rules work.


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Emir Ibrahimbegovic
What have you tried?

On Mon, Jun 8, 2015 at 5:35 PM, Motty Cruz motty.c...@gmail.com wrote:

 Hello,
 I am getting the following suggestions from:
 https://developers.google.com/speed/pagespeed/insights/


 Should Fix:
 Optimize images
 Leverage browser caching
 Consider Fixing:
 Eliminate render-blocking JavaScript and CSS in above-the-fold content
 Minify CSS
 Minify HTML

 What is the best practice to solve errors above?

 Thanks,

 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org




Re: [users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Darryle Steplight
Look into grunt or gulp first for Minify CSS,Minify HTML and optimizing images.

On Mon, Jun 8, 2015 at 5:38 PM, Emir Ibrahimbegovic
emir.ibrahimbego...@gmail.com wrote:
 What have you tried?

 On Mon, Jun 8, 2015 at 5:35 PM, Motty Cruz motty.c...@gmail.com wrote:

 Hello,
 I am getting the following suggestions from:
 https://developers.google.com/speed/pagespeed/insights/


 Should Fix:
 Optimize images
 Leverage browser caching
 Consider Fixing:
 Eliminate render-blocking JavaScript and CSS in above-the-fold content
 Minify CSS
 Minify HTML

 What is the best practice to solve errors above?

 Thanks,

 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org





-- 
--
May the source be with you.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Darryle Steplight
And CDNs are your friend.

On Mon, Jun 8, 2015 at 5:41 PM, Darryle Steplight dstepli...@gmail.com wrote:
 Look into grunt or gulp first for Minify CSS,Minify HTML and optimizing 
 images.

 On Mon, Jun 8, 2015 at 5:38 PM, Emir Ibrahimbegovic
 emir.ibrahimbego...@gmail.com wrote:
 What have you tried?

 On Mon, Jun 8, 2015 at 5:35 PM, Motty Cruz motty.c...@gmail.com wrote:

 Hello,
 I am getting the following suggestions from:
 https://developers.google.com/speed/pagespeed/insights/


 Should Fix:
 Optimize images
 Leverage browser caching
 Consider Fixing:
 Eliminate render-blocking JavaScript and CSS in above-the-fold content
 Minify CSS
 Minify HTML

 What is the best practice to solve errors above?

 Thanks,

 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org





 --
 --
 May the source be with you.



-- 
--
May the source be with you.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Pete Houston
On Mon, Jun 08, 2015 at 02:35:24PM -0700, Motty Cruz wrote:
 Should Fix:
 Optimize images
 Leverage browser caching
 Consider Fixing:
 Eliminate render-blocking JavaScript and CSS in above-the-fold content
 Minify CSS
 Minify HTML

All of those bar one are content issues and therefore unconnected with
your server config.

The one you might consider is Leverage browser caching which suggests
that you have not set your expiry headers sensibly (or at all). Have a
look at the mod_expires documentation at
http://httpd.apache.org/docs/2.4/mod/mod_expires.html

Pete
-- 
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107


pgpQklo20nrR0.pgp
Description: PGP signature


Re: [users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Motty Cruz

Hello,
I added this code on .htaccess

IfModule  mod_mime.c
 AddType application/x-javascript .js
 AddType text/css .css
/IfModule
IfModule  mod_deflate.c
 *AddOutputFilterByType DEFLATE text/css application/x-javascript 
text/x-component text/html text/richtext image/svg+xml text/plain text/xsd 
text/xsl text/xml image/x-icon application/javascript*
 IfModule  mod_setenvif.c
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 /IfModule
 IfModule  mod_headers.c
  Header append Vary User-Agent env=!dont-vary
 /IfModule
/IfModule

does not seem to make a difference!



On 06/08/2015 02:38 PM, Emir Ibrahimbegovic wrote:

What have you tried?

On Mon, Jun 8, 2015 at 5:35 PM, Motty Cruz motty.c...@gmail.com 
mailto:motty.c...@gmail.com wrote:


Hello,
I am getting the following suggestions from:
https://developers.google.com/speed/pagespeed/insights/


Should Fix:
Optimize images
Leverage browser caching
Consider Fixing:
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Minify CSS
Minify HTML

What is the best practice to solve errors above?

Thanks,

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
mailto:users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
mailto:users-h...@httpd.apache.org






[users@httpd] Apache24 - how to optimize httpd.conf

2015-06-08 Thread Motty Cruz

Hello,
I am getting the following suggestions from:
https://developers.google.com/speed/pagespeed/insights/


Should Fix:
Optimize images
Leverage browser caching
Consider Fixing:
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Minify CSS
Minify HTML

What is the best practice to solve errors above?

Thanks,

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Complex combination of Allow and Deny for Apache

2015-06-08 Thread Daniel
you can't add Directory entries in a .htaccess file

about the files entry, maybe you could include it all in a single regex
expression.

2015-06-08 21:51 GMT+02:00 mathieu...@laposte.net:

 Hello

 With Apache, I searched to deny access to all *.php URL in a subdirectory.
 I succeed with this in .htaccess :
 ***
 Order deny,allow
 Allow from All

 Files ~ ^.*\.php$
 Deny from All
 /Files
 ***

 But now, I want to add a extra access for one single URL who was denied. I
 made a lot of test but a obtained only no effect or error 500 for example
 with this :
 ***
 Order deny,allow
 Allow from All

 Directory /home/site/www/repertoire1/repertoire2/
 Files fichier.php
 Allow from All
 /Files
 /Directory

 Files ~ ^.*\.php$
 Deny from All
 /Files
 ***

 this .htaccess is in repertoire1 and the URL I want to allow is
 http://example.com/repertoire1/repertoire2/fichier.php
 I cannot put files in the directory repertoire2 then I want to put all
 access rules in one single .htaccess file


 Thank you for everyone that can help me to understand how the access rules
 work.


 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org




-- 
*Daniel Ferradal*
IT Specialist

email dferradal at gmail.com
linkedin es.linkedin.com/in/danielferradal


Re: [users@httpd] mod_headers: REQUEST_URI for static files

2015-06-08 Thread Christian Weiske
Hello Yann,


  $ curl -I example.org/
  ...
  Link: http://example.org/index.htm; rel=self
 
  But I do not get the original request URI (/ only), which is what
  I'm looking for.

 If you want the original URI instead of the DirectoryIndex, you
 probably need to save it in an environment variable with a
 RewriteRule, and then use that variable in the Header rule.
 Something like:
 
 RewriteEngine On
 RewriteRule ^ - [E=ORIGINAL_URI:%{REQUEST_URI}]
 Header append Link 'http://example.org%{ORIGINAL_URI}e

This does also give me null for static files, while it does work for
files handled by FastCGI:

 $ curl -I www.bogo/tagebuch/
 HTTP/1.1 200 OK
 Link: http://example.org(null)

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-


signature.asc
Description: PGP signature