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.
Can’t login to DirectAdmin on port 2222
1. DirectAdmin might not be running or
2. You have a firewall blocking port 2222.
In case issue 2ยบ is the one affecting you,
iptables -I INPUT -p tcp –dport 2222 -j ACCEPT
Check your /var/log/directadmin/error.log to check for any errors as to why it isn’t starting:
tail /var/log/directadmin/error.log
Common problems are:
1. Incorrect ethernet_dev set in the /usr/local/directadmin/conf/directadmin.conf file. guide
2. Invalid license, either due to wrong uid/lid, IP, or date. Try: Updating your DirectAdmin License manually
3. Binaries for a different operating system.
You can always try running DirectAdmin by hand (if it’s not already running) to see what the problem is.
cd /usr/local/directadmin
./directadmin b200
Updating DirectAdmin Manually
If you need to update your copy of DirectAdmin manually, you can do so by running the following commands:
cd /usr/local/directadmin
wget -O update.tar.gz https://www.directadmin.com/cgi-bin/daupdate?uid=123\&lid=1234
tar xvzf update.tar.gz
./directadmin p
cd scripts
./update.sh
service directadmin restart
Where 123 and 1234 are your Client ID and License ID, respectively. Note that if you are running FreeBSD, you might need to add a \ before the ? character in the wget line. If there are errrors extracting the update.tar.gz file, then run:
to search for an error.