Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

Wednesday, February 22, 2012

Allow Website from Fix IPs in Apache

Add this to the directory configuration in virtualhost:

Order Deny, Allow
Deny from All
Allow from 110.70.55.154 10.0.0. 173.0.82.126 127.0.0.1

Disable Apache Server Signature

Add ServerSignature Off to virtualhost configuration. Restart Apache.

Thursday, January 19, 2012

Moodle: Upload Big Files

  1. Set post_max_size to (ex.) 1000M in php.ini.
  2. Set upload_max_filesize to (ex.) 1000M in php.ini.
  3. Check the upload_tmp_dir value on the phpinfo page. If it's empty, php use the default tmp folder. On linux, it is /tmp. Sometimes it's a mapped partition/device and it has a size. If the size is lower than 1000MB, the upload won't work. Change the size of the tmp dir!
  4. If there is a LimitRequestBody row in httpd.conf (apache) or in a virtual host file, change the value to 0, it means unlimited.

Monday, October 24, 2011

Enable Virtual Host Site

Enable: a2ensite mysiteavailable-site
Disable: a2dissite mysiteavailable-site

Tuesday, June 22, 2010

Enable mod_rewrite in Apache 2

Use the a2enmod rewrite command to enable mod_rewrite in Apache2, then restart the webserver with: /etc/init.d/apache2 restart