Advertisement
Guest User

Error 500

a guest
Jul 31st, 2013
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.15 KB | None | 0 0
  1. # # av:php5-engine
  2. AddHandler av-php53 .php
  3.  
  4. php_value post_max_size 20M
  5. php_value upload_max_filesize 20M
  6. php_value memory_limit 128M
  7.  
  8. # # av:Toolbar
  9. SetEnv AV_TOOLBAR 0
  10.  
  11. # Apache configuration file
  12. # httpd.apache.org/docs/2.2/mod/quickreference.html
  13.  
  14. # Note .htaccess files are an overhead, this logic should be in your Apache config if possible
  15. # httpd.apache.org/docs/2.2/howto/htaccess.html
  16.  
  17. # Techniques in here adapted from all over, including:
  18. # Kroc Camen: camendesign.com/.htaccess
  19. # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
  20. # Sample .htaccess file of CMS MODx: modxcms.com
  21.  
  22.  
  23. ###
  24. ### If you run a webserver other than Apache, consider:
  25. ### github.com/h5bp/server-configs
  26. ###
  27.  
  28.  
  29.  
  30. # ----------------------------------------------------------------------
  31. # Better website experience for IE users
  32. # ----------------------------------------------------------------------
  33.  
  34. # Force the latest IE version, in various cases when it may fall back to IE7 mode
  35. # github.com/rails/rails/commit/123eb25#commitcomment-118920
  36. # Use ChromeFrame if it's installed for a better experience for the poor IE folk
  37.  
  38. <IfModule mod_headers.c>
  39. Header set X-UA-Compatible "IE=Edge,chrome=1"
  40. # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  41. <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
  42. Header unset X-UA-Compatible
  43. </FilesMatch>
  44. </IfModule>
  45.  
  46.  
  47. # ----------------------------------------------------------------------
  48. # Cross-domain AJAX requests
  49. # ----------------------------------------------------------------------
  50.  
  51. # Serve cross-domain Ajax requests, disabled by default.
  52. # enable-cors.org
  53. # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
  54.  
  55. # <IfModule mod_headers.c>
  56. # Header set Access-Control-Allow-Origin "*"
  57. # </IfModule>
  58.  
  59.  
  60. # ----------------------------------------------------------------------
  61. # CORS-enabled images (@crossorigin)
  62. # ----------------------------------------------------------------------
  63.  
  64. # Send CORS headers if browsers request them; enabled by default for images.
  65. # developer.mozilla.org/en/CORS_Enabled_Image
  66. # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
  67. # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
  68. # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
  69.  
  70. <IfModule mod_setenvif.c>
  71. <IfModule mod_headers.c>
  72. # mod_headers, y u no match by Content-Type?!
  73. <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
  74. SetEnvIf Origin ":" IS_CORS
  75. Header set Access-Control-Allow-Origin "*" env=IS_CORS
  76. </FilesMatch>
  77. </IfModule>
  78. </IfModule>
  79.  
  80.  
  81. # ----------------------------------------------------------------------
  82. # Webfont access
  83. # ----------------------------------------------------------------------
  84.  
  85. # Allow access from all domains for webfonts.
  86. # Alternatively you could only whitelist your
  87. # subdomains like "subdomain.example.com".
  88.  
  89. <IfModule mod_headers.c>
  90. <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
  91. Header set Access-Control-Allow-Origin "*"
  92. </FilesMatch>
  93. </IfModule>
  94.  
  95.  
  96.  
  97. # ----------------------------------------------------------------------
  98. # Proper MIME type for all files
  99. # ----------------------------------------------------------------------
  100.  
  101.  
  102. # JavaScript
  103. # Normalize to standard type (it's sniffed in IE anyways)
  104. # tools.ietf.org/html/rfc4329#section-7.2
  105. AddType application/javascript js
  106.  
  107. # Audio
  108. AddType audio/ogg oga ogg
  109. AddType audio/mp4 m4a
  110.  
  111. # Video
  112. AddType video/ogg ogv
  113. AddType video/mp4 mp4 m4v
  114. AddType video/webm webm
  115.  
  116. # SVG
  117. # Required for svg webfonts on iPad
  118. # twitter.com/FontSquirrel/status/14855840545
  119. AddType image/svg+xml svg svgz
  120. AddEncoding gzip svgz
  121.  
  122. # Webfonts
  123. AddType application/vnd.ms-fontobject eot
  124. AddType application/x-font-ttf ttf ttc
  125. AddType font/opentype otf
  126. AddType application/x-font-woff woff
  127.  
  128. # Assorted types
  129. AddType image/x-icon ico
  130. AddType image/webp webp
  131. AddType text/cache-manifest appcache manifest
  132. AddType text/x-component htc
  133. AddType application/x-chrome-extension crx
  134. AddType application/x-opera-extension oex
  135. AddType application/x-xpinstall xpi
  136. AddType application/octet-stream safariextz
  137. AddType application/x-web-app-manifest+json webapp
  138. AddType text/x-vcard vcf
  139.  
  140.  
  141.  
  142. # ----------------------------------------------------------------------
  143. # Allow concatenation from within specific js and css files
  144. # ----------------------------------------------------------------------
  145.  
  146. # e.g. Inside of script.combined.js you could have
  147. # <!--#include file="libs/jquery-1.5.0.min.js" -->
  148. # <!--#include file="plugins/jquery.idletimer.js" -->
  149. # and they would be included into this single file.
  150.  
  151. # This is not in use in the boilerplate as it stands. You may
  152. # choose to name your files in this way for this advantage or
  153. # concatenate and minify them manually.
  154. # Disabled by default.
  155.  
  156. #<FilesMatch "\.combined\.js$">
  157. # Options +Includes
  158. # AddOutputFilterByType INCLUDES application/javascript application/json
  159. # SetOutputFilter INCLUDES
  160. #</FilesMatch>
  161. #<FilesMatch "\.combined\.css$">
  162. # Options +Includes
  163. # AddOutputFilterByType INCLUDES text/css
  164. # SetOutputFilter INCLUDES
  165. #</FilesMatch>
  166.  
  167.  
  168. # ----------------------------------------------------------------------
  169. # Gzip compression
  170. # ----------------------------------------------------------------------
  171.  
  172. <IfModule mod_deflate.c>
  173.  
  174. # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  175. <IfModule mod_setenvif.c>
  176. <IfModule mod_headers.c>
  177. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  178. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  179. </IfModule>
  180. </IfModule>
  181.  
  182. # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
  183. <IfModule filter_module>
  184. FilterDeclare COMPRESS
  185. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
  186. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
  187. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
  188. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
  189. FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
  190. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
  191. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
  192. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
  193. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
  194. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
  195. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
  196. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
  197. FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
  198. FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
  199. FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
  200. FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
  201. FilterChain COMPRESS
  202. FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
  203. </IfModule>
  204.  
  205. <IfModule !mod_filter.c>
  206. # Legacy versions of Apache
  207. AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  208. AddOutputFilterByType DEFLATE application/javascript
  209. AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  210. AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
  211. AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
  212. </IfModule>
  213.  
  214. </IfModule>
  215.  
  216.  
  217. # ----------------------------------------------------------------------
  218. # Expires headers (for better cache control)
  219. # ----------------------------------------------------------------------
  220.  
  221. # These are pretty far-future expires headers.
  222. # They assume you control versioning with cachebusting query params like
  223. # <script src="application.js?20100608">
  224. # Additionally, consider that outdated proxies may miscache
  225. # www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
  226.  
  227. # If you don't use filenames to version, lower the CSS and JS to something like
  228. # "access plus 1 week" or so.
  229.  
  230. <IfModule mod_expires.c>
  231. ExpiresActive on
  232.  
  233. # Perhaps better to whitelist expires rules? Perhaps.
  234. ExpiresDefault "access plus 1 month"
  235.  
  236. # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  237. ExpiresByType text/cache-manifest "access plus 0 seconds"
  238.  
  239. # Your document html
  240. ExpiresByType text/html "access plus 0 seconds"
  241.  
  242. # Data
  243. ExpiresByType text/xml "access plus 0 seconds"
  244. ExpiresByType application/xml "access plus 0 seconds"
  245. ExpiresByType application/json "access plus 0 seconds"
  246.  
  247. # Feed
  248. ExpiresByType application/rss+xml "access plus 1 hour"
  249. ExpiresByType application/atom+xml "access plus 1 hour"
  250.  
  251. # Favicon (cannot be renamed)
  252. ExpiresByType image/x-icon "access plus 1 week"
  253.  
  254. # Media: images, video, audio
  255. ExpiresByType image/gif "access plus 1 month"
  256. ExpiresByType image/png "access plus 1 month"
  257. ExpiresByType image/jpg "access plus 1 month"
  258. ExpiresByType image/jpeg "access plus 1 month"
  259. ExpiresByType video/ogg "access plus 1 month"
  260. ExpiresByType audio/ogg "access plus 1 month"
  261. ExpiresByType video/mp4 "access plus 1 month"
  262. ExpiresByType video/webm "access plus 1 month"
  263.  
  264. # HTC files (css3pie)
  265. ExpiresByType text/x-component "access plus 1 month"
  266.  
  267. # Webfonts
  268. ExpiresByType application/x-font-ttf "access plus 1 month"
  269. ExpiresByType font/opentype "access plus 1 month"
  270. ExpiresByType application/x-font-woff "access plus 1 month"
  271. ExpiresByType image/svg+xml "access plus 1 month"
  272. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  273.  
  274. # CSS and JavaScript
  275. ExpiresByType text/css "access plus 1 year"
  276. ExpiresByType application/javascript "access plus 1 year"
  277.  
  278. </IfModule>
  279.  
  280.  
  281.  
  282. # ----------------------------------------------------------------------
  283. # ETag removal
  284. # ----------------------------------------------------------------------
  285.  
  286. # FileETag None is not enough for every server.
  287. <IfModule mod_headers.c>
  288. Header unset ETag
  289. </IfModule>
  290.  
  291. # Since we're sending far-future expires, we don't need ETags for
  292. # static content.
  293. # developer.yahoo.com/performance/rules.html#etags
  294. FileETag None
  295.  
  296.  
  297.  
  298. # ----------------------------------------------------------------------
  299. # Stop screen flicker in IE on CSS rollovers
  300. # ----------------------------------------------------------------------
  301.  
  302. # The following directives stop screen flicker in IE on CSS rollovers - in
  303. # combination with the "ExpiresByType" rules for images (see above). If
  304. # needed, un-comment the following rules.
  305.  
  306. # BrowserMatch "MSIE" brokenvary=1
  307. # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
  308. # BrowserMatch "Opera" !brokenvary
  309. # SetEnvIf brokenvary 1 force-no-vary
  310.  
  311.  
  312.  
  313. # ----------------------------------------------------------------------
  314. # Cookie setting from iframes
  315. # ----------------------------------------------------------------------
  316.  
  317. # Allow cookies to be set from iframes (for IE only)
  318. # If needed, uncomment and specify a path or regex in the Location directive
  319.  
  320. # <IfModule mod_headers.c>
  321. # <Location />
  322. # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
  323. # </Location>
  324. # </IfModule>
  325.  
  326.  
  327.  
  328. # ----------------------------------------------------------------------
  329. # Start rewrite engine
  330. # ----------------------------------------------------------------------
  331.  
  332. # Turning on the rewrite engine is necessary for the following rules and features.
  333. # FollowSymLinks must be enabled for this to work.
  334.  
  335. <IfModule mod_rewrite.c>
  336. Options +FollowSymlinks
  337. RewriteEngine On
  338. </IfModule>
  339.  
  340.  
  341.  
  342. # ----------------------------------------------------------------------
  343. # Suppress or force the "www." at the beginning of URLs
  344. # ----------------------------------------------------------------------
  345.  
  346. # The same content should never be available under two different URLs - especially not with and
  347. # without "www." at the beginning, since this can cause SEO problems (duplicate content).
  348. # That's why you should choose one of the alternatives and redirect the other one.
  349.  
  350. # By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
  351. # no-www.org/faq.php?q=class_b
  352.  
  353. # If you rather want to use option 2, just comment out all option 1 lines
  354. # and uncomment option 2.
  355. # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
  356.  
  357. # ----------------------------------------------------------------------
  358.  
  359. # Option 1:
  360. # Rewrite "www.example.com -> example.com"
  361.  
  362. <IfModule mod_rewrite.c>
  363. RewriteCond %{HTTPS} !=on
  364. RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  365. RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
  366. </IfModule>
  367.  
  368. # ----------------------------------------------------------------------
  369.  
  370. # Option 2:
  371. # To rewrite "example.com -> www.example.com" uncomment the following lines.
  372. # Be aware that the following rule might not be a good idea if you
  373. # use "real" subdomains for certain parts of your website.
  374.  
  375. # <IfModule mod_rewrite.c>
  376. # RewriteCond %{HTTPS} !=on
  377. # RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
  378. # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  379. # </IfModule>
  380.  
  381.  
  382.  
  383. # ----------------------------------------------------------------------
  384. # Built-in filename-based cache busting
  385. # ----------------------------------------------------------------------
  386.  
  387. # If you're not using the build script to manage your filename version revving,
  388. # you might want to consider enabling this, which will route requests for
  389. # /css/style.20110203.css to /css/style.css
  390.  
  391. # To understand why this is important and a better idea than all.css?v1231,
  392. # read: github.com/h5bp/html5-boilerplate/wiki/Version-Control-with-Cachebusting
  393.  
  394. # Uncomment to enable.
  395. # <IfModule mod_rewrite.c>
  396. # RewriteCond %{REQUEST_FILENAME} !-f
  397. # RewriteCond %{REQUEST_FILENAME} !-d
  398. # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
  399. # </IfModule>
  400.  
  401.  
  402.  
  403. # ----------------------------------------------------------------------
  404. # Prevent SSL cert warnings
  405. # ----------------------------------------------------------------------
  406.  
  407. # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
  408. # https://www.example.com when your cert only allows https://secure.example.com
  409. # Uncomment the following lines to use this feature.
  410.  
  411. # <IfModule mod_rewrite.c>
  412. # RewriteCond %{SERVER_PORT} !^443
  413. # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
  414. # </IfModule>
  415.  
  416.  
  417.  
  418. # ----------------------------------------------------------------------
  419. # Prevent 404 errors for non-existing redirected folders
  420. # ----------------------------------------------------------------------
  421.  
  422. # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
  423. # e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
  424.  
  425. Options -MultiViews
  426.  
  427.  
  428.  
  429. # ----------------------------------------------------------------------
  430. # Custom 404 page
  431. # ----------------------------------------------------------------------
  432.  
  433. # You can add custom pages to handle 500 or 403 pretty easily, if you like.
  434. ErrorDocument 404 /404.html
  435.  
  436.  
  437.  
  438. # ----------------------------------------------------------------------
  439. # UTF-8 encoding
  440. # ----------------------------------------------------------------------
  441.  
  442. # Use UTF-8 encoding for anything served text/plain or text/html
  443. AddDefaultCharset utf-8
  444.  
  445. # Force UTF-8 for a number of file formats
  446. AddCharset utf-8 .css .js .xml .json .rss .atom
  447.  
  448.  
  449.  
  450. # ----------------------------------------------------------------------
  451. # A little more security
  452. # ----------------------------------------------------------------------
  453.  
  454.  
  455. # Do we want to advertise the exact version number of Apache we're running?
  456. # Probably not.
  457. ## This can only be enabled if used in httpd.conf - It will not work in .htaccess
  458. # ServerTokens Prod
  459.  
  460.  
  461. # "-Indexes" will have Apache block users from browsing folders without a default document
  462. # Usually you should leave this activated, because you shouldn't allow everybody to surf through
  463. # every folder on your server (which includes rather private places like CMS system folders).
  464. <IfModule mod_autoindex.c>
  465. Options -Indexes
  466. </IfModule>
  467.  
  468.  
  469. # Block access to "hidden" directories whose names begin with a period. This
  470. # includes directories used by version control systems such as Subversion or Git.
  471. <IfModule mod_rewrite.c>
  472. RewriteCond %{REQUEST_FILENAME} -s [OR]
  473. RewriteCond %{REQUEST_FILENAME} -l [OR]
  474. RewriteCond %{REQUEST_FILENAME} -d
  475. RewriteRule ^.*$ - [NC,L]
  476. RewriteRule ^.*$ index.php [NC,L]
  477. </IfModule>
  478.  
  479.  
  480. # Block access to backup and source files
  481. # This files may be left by some text/html editors and
  482. # pose a great security danger, when someone can access them
  483. <FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
  484. Order allow,deny
  485. Deny from all
  486. Satisfy All
  487. </FilesMatch>
  488.  
  489.  
  490. # If your server is not already configured as such, the following directive
  491. # should be uncommented in order to set PHP's register_globals option to OFF.
  492. # This closes a major security hole that is abused by most XSS (cross-site
  493. # scripting) attacks. For more information: http://php.net/register_globals
  494. #
  495. # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
  496. #
  497. # Your server does not allow PHP directives to be set via .htaccess. In that
  498. # case you must make this change in your php.ini file instead. If you are
  499. # using a commercial web host, contact the administrators for assistance in
  500. # doing this. Not all servers allow local php.ini files, and they should
  501. # include all PHP configurations (not just this one), or you will effectively
  502. # reset everything to PHP defaults. Consult www.php.net for more detailed
  503. # information about setting PHP directives.
  504.  
  505. # php_flag register_globals Off
  506.  
  507. # Rename session cookie to something else, than PHPSESSID
  508. # php_value session.name sid
  509.  
  510. # Do not show you are using PHP
  511. # Note: Move this line to php.ini since it won't work in .htaccess
  512. # php_flag expose_php Off
  513.  
  514. # Level of log detail - log all errors
  515. # php_value error_reporting -1
  516.  
  517. # Write errors to log file
  518. # php_flag log_errors On
  519.  
  520. # Do not display errors in browser (production - Off, development - On)
  521. # php_flag display_errors Off
  522.  
  523. # Do not display startup errors (production - Off, development - On)
  524. # php_flag display_startup_errors Off
  525.  
  526. # Format errors in plain text
  527. # Note: Leave this setting 'On' for xdebug's var_dump() output
  528. # php_flag html_errors Off
  529.  
  530. # Show multiple occurrence of error
  531. # php_flag ignore_repeated_errors Off
  532.  
  533. # Show same errors from different sources
  534. # php_flag ignore_repeated_source Off
  535.  
  536. # Size limit for error messages
  537. # php_value log_errors_max_len 1024
  538.  
  539. # Don't precede error with string (doesn't accept empty string, use whitespace if you need)
  540. # php_value error_prepend_string " "
  541.  
  542. # Don't prepend to error (doesn't accept empty string, use whitespace if you need)
  543. # php_value error_append_string " "
  544.  
  545. # Increase cookie security
  546. <IfModule php5_module>
  547. php_value session.cookie_httponly true
  548. </IfModule>
  549. # Use PHP 5.3
  550. # Hostgator Force php 5.3
  551. #Action application/x-hg-php53 /cgi-sys/php53
  552. #AddType application/x-httpd-php53 .php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement