Student Homepage
Contents |
Overview (quick guide)
You can make your own World Wide Web page(s) available on the Internet! Just complete these steps:
1. Go to the directory in your home directory called public_html. If this directory does not exist, you must create it first.
2. Create a file called index.html in this directory. This is your homepage file.
3. Type the information you want in to the file. This must be done in Hyper Text Markup Language (thus the extension html).
How to get started
- Start a Terminal window.
- Go to your home dir
cd ~
- List the contents of your home dir
ls
If you don't have a dir called "public_html" type the following to create it:
mkdir public_html
Now you have a directory where your web files will reside in. Start for example by making a file called index.html:
- Go to the public_html dir
cd public_html
- Edit a new file called index.html (pico is used in this example - use your favorite editor)
pico index.html
- Write something like the following in index.html and save it
<html>
<head><title> My Homepage </title></head>
<body>
This is a test!
</body>
</html>
You should now have a web page up and running. Try to go: http://www.student.dtu.dk/~username/ (where "username" should be replaced by _your_ username).
NB - If you get a permissions error check the following section about permissions!
Permissions
To let others view your homepage, you have to set permissions on your home directory and the public_html directory.
NB - For at better understanding of Unix Permissions read the section on permissions
- First of all you start a Terminal window.
- Then you write the following 2 commands, which will change the permissions on your home dir (~) and public_html.
chmod 755 ~ chmod 755 ~/public_html
- There is a more restrictive way, if you don't want to give everybody read access to your home directory. This can be achieved by:
chmod 701 ~ chmod 755 ~/public_html
See the Permissions page for more information.
PHP
Yes, you can use PHP with your homepage.
MySQL
We don't provide MySQL. The only MySQL server running at DTU is for courses which requires it.

