HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   Clever ISPConfig Directive Snippets List (http://www.howtoforge.com/forums/showthread.php?t=61819)

Hairy 12th May 2013 00:44

Clever ISPConfig Directive Snippets List
 
I would like to know if anyone has any clever snippets that they would like to share and add to the following list:

/* Large PHP Uploads */
Code:

file_uploads = On
post_max_size = 200M
upload_max_filesize = 200M

/* Display PHP Errors */
Code:

display_errors = On
Thanks!

MaddinXx 12th May 2013 16:05

Good idea. What I often override is open_short_tags and memory_limit per vhost - but the file upload limit one is very handy

misuv 5th May 2014 13:47

Development & test site
 
Snippet for testing sites

Code:

max_execution_time = 0;
display_errors = On;
error_reporting =  E_ALL & E_STRICT & E_RECOVERABLE_ERROR & E_DEPRECATED & E_USER_DEPRECATED;


Nilpo 5th May 2014 17:11

I'm not sure if they're of any use to anyone, but here are the ones that I use.

Apache:

/* Force SSL */
Code:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

/* Disable GeioIP2 (when installed) */
Code:

GeoIPEnable Off
/* Block Certain Countries (with mod_geoip2) */
Code:

<IfModule mod_geoip.c>
        GeoIPEnable On
        GeoIPDBFile /usr/share/GeoIP/GeoIP.dat

        SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
        SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
        # ... place more countries here

        Deny from env=BlockCountry
</IfModule>

/* Allow Only Specific Countries (with mod_geoip2) */
Code:

<IfModule mod_geoip.c>
        GeoIPEnable On
        GeoIPDBFile /usr/share/GeoIP/GeoIP.dat

        SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
        SetEnvIf GEOIP_COUNTRY_CODE CA AllowCountry
        SetEnvIf GEOIP_COUNTRY_CODE MX AllowCountry
        # ... place more countries here

        Deny from all
        Allow from env=AllowCountry
</IfModule>

/* Prevent Static File Caching */
Code:

<FilesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</FilesMatch>

/* Disable ModPagespeed (when installed) */
Code:

ModPagespeed Off
/* ModPagespeed Wordpress Fix (when installed) */
Code:

ModPagespeedDisableFilters rewrite_javascript


All times are GMT +2. The time now is 21:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.