Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

5/29/2012

Apache mod rewrite

RewriteRule ^old\.html$ new.html

Command Flag
[R] Redirect you can add an =301 or =302 to change the type.
[F] Forces the url to be forbidden. 403 header
[G] Forces the url to be gone 401 header
[L] Last rule. (You should use this on all your rules that don’t link together)
[N] Next round. Rerun the rules again from the start
[C] Chains a rewrite rule together with the next rule.
[T] use T=MIME-type to force the file to be a mime type
[NS] Use if no sub request is requested
[NC] Makes the rule case INsensitive
[QSA] Query String Append use to add to an existing query string
[NE] Turns of normal escapes that are default in the rewriterule
[PT] Pass through to the handler (together with mod alias)
Skip the next rule S=3 skips the next 3 rules
[E] E=var sets an enviromental variable that can be called by other rules

7/12/2011

Apache tuning

http://www.devside.net/articles/apache-performance-tuning

6/02/2011

Howto Secure Apache

1. Use the latest and most current version. Right now the latest is the Apache 2.2 series
2. Make sure you’ve installed all the latest security patches
3. Hide the Apache Version number, and other sensitive information
4. Make sure apache is running under its own user account and group
5. Ensure that files outside the web root are not served
6. Turn off directory browsing (mod_autoindex)
7. Turn off server side includes (SSI)
8. Turn off CGI execution
9. Don’t allow apache to use symbolic links
10. Turning off multiple Options
11. Turn off support for .htaccess files
12. Use the Apache mod_security
13. Disable all unnecessary modules
14. Make sure only root has read access to apache’s config and binaries
15. Lower the Timeout value
16. Limiting large requests
17. Limiting Concurrency
18. Restricting Access by IP
19. Adjusting KeepAlive settings
20. Run Apache in a Chroot environment

5/30/2011

rewriteguide

http://httpd.apache.org/docs/1.3/misc/rewriteguide.html

How to add Mime-Types using .htaccess

http://www.besthostratings.com/articles/mime-types-htaccess.html

3/28/2011

Linux (Apache) : mod rewrite

root@debian:/a2enmod rewrite
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!
root@debian:/var/log# /etc/init.d/apache2 restart

edit site
/etc/apache2/sites-enabled/000-default


ServerAdmin webmaster@localhost

DocumentRoot /var/www

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all


:
:



ดูที่ โดยมองที่ AllowOverride None ให้เปลี่ยนเป็น All

#/etc/init.d/apache2 restart

ไฟล์ .htaccess




config apache : http://www.aboutdebian.com/internet.htm

3/25/2011

Apache : site enable

site enable
/etc/apache2/sites-available

#a2ensite sitename

remove site
#a2dissite sitename


ที่มา : http://www.debian-administration.org/articles/207

7/13/2010

Apache Config

http://www.aboutdebian.com/internet.htm
http://www.debian-administration.org/article/LAMP_on_Sarge_Apache2_PHP5_MySQL5_phpMyAdmin_Smarty_ADODB
http://www.petefreitag.com/item/505.cfm
http://www.ubuntuclub.com/node/47