To enable port 80 on Windows Server 2008 R2:

To enable port 80 on Windows Server 2008 R2:

NOTE: This assumes that IIS is not installed. I added this firewall rule to enable Apache to accept connections on port 80.

  1. Click Start->Control Panel->Windows Firewall
  2. Click “Advanced Settings” in the left panel of Windows Firewall
  3. Click “Inbound rules” in the left panel of Advanced Settings
  4. Click “New Rule…” in right “Actions” panel
  5. Select “Port” and click “Next>”
  6. Select “TCP”, then “Specific local ports:” (should already be selected)
  7. Type 80 in the box (just the number) and click “Next>”
  8. Select “Allow the connection” and click “Next>”
  9. Leave all profiles checked and click “Next>”
  10. Enter a name and click “Finish”.

Your server should now be able to accept connections on port 80.

Source: http://stackoverflow.com/questions/7363470/windows-server-2008-r2-cant-get-apache-to-run-on-port-80

Installing GD library using CPanel

 

If you need to enable imagecreatefromjpeg on CPanel hosting, then do the following…

  • Go to WHM -> Software -> EasyApache
  • If prompted to upgrade, do so then repeat the above step
  • Begin customizing based on the current provile
  • Proceed through the screens until you get to “Step 5″
  • On “Step 5,” click on “Exhaustive Options”
  • Under PHP, check the checkbox for GD
  • Proceed with Build & Compile Process

Source: http://forums.cpanel.net/f5/how-instal-gd-library-114941.html

 

Redirect Website to 1&1 hosting by changing A record IP address

Set the new site up first on the destination 1&1 server

  • create the domain on the 1&1 server and choose to use existing mail server
  • point the new domain’s destination to the correct folder (probably same as the s123456789 domain)

Amend the existing IP address for the domain

  • change the A-record of the source domain to point to the IP address of the 1&1 server.

To get the IP address of a 1&1 server…

  • open a command prompt and enter “ping s12345679.websitehome.co.uk” changing the s12345679 obviously (you should see the IP address appear in the results)
  • alternatively you could view the contents of the PHP $_SERVER array via a file on the server and look for the ‘SERVER_ADDR’ value
  • to test the 1&1 server is all set up to accept the incoming domain, add this to your hosts file: 12.34.56.78 www.yourdomain.com
  • now enter www.yourdomain.com into your browser and you should see the same webpage as visiting s12345679.websitehome.co.uk

Zeus rewrite rules

If a server does not use .htaccess but instead uses zeus, then you will need to place the zeus equivalents in a file called rewrite.script and upload to the root.

Here are some common rewrite examples:

##
## Non www to www

match IN:Host into $ with ^domainname\.co\.uk$
if matched
match URL into $ with ^/(.*)$
if matched
set OUT:Location = http://www.domainname.co.uk/$1
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif
endif

##
## MEDIA FILES

match URL into $ with ^/media/(.*)
if matched set URL=/_getMedia.php?media=$1

##
## STANDARD FILES

match URL into $ with ^/events
if matched set URL=/events.php

##
## ANYTHING IN A FOLDER

match URL into $ with ^/search/(.*)
if matched set URL=/search.php?q=$1

##
## OLD PAGE TO HOME PAGE

match URL into $ with ^/old-product.php$
if matched
set OUT:Location = http://www.domainname.co.uk
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif

##
## OLD PAGE TO NEW PAGE

match URL into $ with ^/my-category.php
if matched
set OUT:Location = http://www.domainname.co.uk/category/my-category
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif