Clever ISPConfig Directive Snippets List

Discussion in 'Tips/Tricks/Mods' started by Hairy, May 12, 2013.

  1. Hairy

    Hairy New Member

    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!
     
  2. MaddinXx

    MaddinXx Member HowtoForge Supporter

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

    misuv New Member

    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;
     
  4. Nilpo

    Nilpo New Member HowtoForge Supporter

    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
     

Share This Page