Increase the max upload filesize in apache/php
You need to edit.
Search for
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
Change the 2M setting the new value you want, then restart apache.
-
/etc/init.d/httpd restart
How to forward a website to another url using PHP
To do this, you need to create the page that will do the forwarding. This can be any page, as long as it ends in “.php”. If you are trying to redirect a domain, you’d create “index.php” inside the public_html directory.
<?php
header(”Location: http://blog.serverbuddies.com”);
?>
Where http://blog.serverbuddies.com is the location that you want the page to forward to.
Showing files in a directory Using Apache.
If you want to list all files in a directory that doesn’t use an index.html (or index.php) file, you can create an .htaccess file with the following contents
This will tell apache that you want to list all files in the directory.
DirectAdmin Apache Update
Check the current version of apache by running.
Update apache to the most recent, run the following:
cd /usr/local/directadmin/customapache
./build clean
./build update
./build apache_mod_ssl
If you’re using apache 2.x, use “./build apache_2″ instead of apache_mod_ssl.
Once the update has completed, you’ll need to restart apache.
Using Perl to Change TTL Values
We’ll change the TTL from 14400 to 100 seconds for all domains
perl -pi -e ’s/14400/100/’ named.db
When changing the IP of a domain, end users will have the old IP of the domain cached at their ISP’s nameservers for a duration of the TTL (time to live). The default value is 14400 seconds (4 hours). This means, that when you change the IP of the sever, the worst case, is the end users will be using the wrong IP for 4 hours before the cache expires and the IP is recached with the correct value.
The simple way to minimize this propogation error is to lower the TTL.