How can I see the environment variables a process is running with?

You can run the following command:

ps auxwwe |grep processname

Increase the max upload filesize in apache/php

You need to edit.

/usr/local/lib/php.ini

Search for

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Change the 2M setting the new value you want, then restart apache.

  1. /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

Options +Indexes

This will tell apache that you want to list all files in the directory.


DirectAdmin Apache Update

DirectAdmin Apache Update

Check the current version of apache by running.

httpd -v

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.

« Prev - Next »