Some frequently asked questions about our Linux shared web server.

How do I view the Powernet-README.txt file?

By default: http://your.site.name/Powernet-README.txt

Alternatively, log in using SSH, then type

less /usr/local/Powernet-README.txt

Many of the following questions are either answered in the Powernet-README.txt file, or explained in more detail there.

Why do my PHP pages say "Internal server error"?

See the README file for more information.

How do I make a file "executable"?

Either: log in using ssh, then use "chmod +x FILE" :

cd html
chmod +x index.php
# Short cut: do all "php" files in this directory
chmod +x *.php

Or: if you upload your web site using FTP, your FTP program may include an option for marking files as executable. Look for a setting for "Change permissions", or similar.

Why do some of the characters on my web page display as question marks?

All text files, including web pages, use a character encoding (or character set). If the web server's encoding doesn't match your page's encoding, you might see non-ASCII characters (such as pound signs, the copyright symbol, accented letters, or "smart quotes") displayed incorrectly.

The web server's default character set is UTF-8. If your web pages are not encoded using UTF-8, some characters may display incorrectly.

There several possible ways to fix this:

See the README file for more information.

How do I make a password protected area?

To do this, you need to do two things:

Creating the password file

Log in to the server (using SSH), and create yourself a password file:

cd ~/data
htpasswd -c mypasswords myusername

This creates a password file called "mypasswords", and adds a user called "myusername" into that file. If you've already got a password file, you can add more users by leaving out the "-c":

htpasswd mypasswords anotheruser

Making the web server use that password file

Now you've got a password file, you need to tell the web server that if anyone wants to access the directory you want to protect, they must authenticate using that password file first.

To do this, create a file called .htaccess in the directory you want to protect, and add the following:

AuthType Basic
AuthName "Protected Area"
AuthUserFile /custdata/<YOUR WEBSITE NAME HERE>/mypasswords
Require valid-user
Satisfy all

Change <YOUR WEBSITE NAME HERE> to the name of your website. If you're not sure what name to use, log in using SSH then type

readlink ~/data

How do I send email from my web site?

Log in (using SSH) and read /usr/local/bin/shared-cgi/formmail-README.txt

See also the README file.

How can I redirect my page to another site?

Log in and create a file called index.cgi with the following contents:

#!/bin/sh

echo "status:302 moved temporarily
Location: http://<NEW WEBSITE NAME HERE>

"

Then make the file executable.

When I send email from my web site, why isn't it getting through?

One possible reason is that it's being sent using an invalid sender address.

All email needs to have a valid sender address (a.k.a. bounce address, return-path, "MAIL FROM" address). Mail which is sent using an invalid sender address will most likely not get delivered.

When you send mail from your web hosting account, it always uses the same sender address. At Powernet we sometimes refer to this as the "webmaster" address, simply because people often choose to use an address like <webmaster@example.com>. However it doesn't have to actually be "webmaster@" anything - it can be any address you choose, as long as it's valid.

If this address is set up incorrectly, you probably won't be able to send any mail from your web.

To fix this, make sure that the sender address used by your account is valid.

To see what address is being used for your account, log in to the server using SSH. When you log in you'll be shown some "welcome" messages, including the current setting of your sender address.

To change the sender address, get in touch and let us know what sender address you'd like to use instead.

Shared Web Server FAQ (last edited 2007-08-15 11:30:59 by DaveEvans)