- Where do I put my files?
You need to create a directory called public_html in your home directory. Inside of that you should have an index.html or index.php file to act as your default page.
mkdir ~/public_html
cd ~/public_html
vi index.html
- How do I get to my webpage?
You get to your webpage by directing your browser to http://classweb.cs.memphis.edu/~username/. If your user id is tom, then you would go to http://classweb.cs.memphis.edu/~tom/
- What kind of server is this?
The server is Apache with PHP support.
- Can I run cgi scripts?
Yes. Inside of your ~/public_html directory you can create a cgi-bin directory.
mkdir ~/public_html/cgi-bin/
Inside of that directory you can have executable shell scripts ending with a .pl and .cgi file extension. Example scripts can be found in PERL and in Bourne Shell. After writing your script you need to make it executable.
chmod a+x myperlscript.pl
Please debug all of your scripts from the command line before running them through the webserver.
./myperlscript.pl
- I try to view my webpage but get the following error:
Forbidden
"You don't have permission to access /~myuserid/ on this server."
This could be caused by a few things. Try each of the solutions below in order.
- Your home directory isn't world readable/executable(necessary for
your webpage to be accessible). To fix this enter the shell command:
chmod 755 ~/
- Your public_html directory in your home directory isn't world
readable/executable. This can be fixed with the shell command:
chmod 755 ~/public_html
- There is no index.php or index.html file in your public_html
directory. If you have another file you'd like to use as your home page
you can enter the shell command:
ln -s home.html index.html
and your data should become available. Otherwise create a
~/public_html/index.html file and put some text in it.
bash: ./myscript.pl: bad interpreter: No such file or directory
- If your script was written in windows it could be a carraige return/linefeed problem. try the following command
perl -p -i -e 's/\r//' myscript.pl
It won't modify any visible characters in your script.
- If the above solution doesn't work, the path to the perl interpreter is probably bad. Your script header should always have #!/usr/bin/perl at the beginning. See the example in PERL.
- Is there anyway to see what else is going on?
Yes, check out the Errors and Requests Page. It basically shows all the activity you've made on the server.