Hide menu
Valid for: HT25

Publishing web pages

The instructions on this page are specific to publishing web pages on the LiU Linux environment web server. Note that this is not required for completing or submitting the assignments and we recommend using the Live Server extension in VS Code instead.

Files and directories saved in directory /wwwpub/liuid123 accessed from the LiU Linux environment are made publicly available at the URL https://php-web.edu.liu.se/~liuid123/ (replace liuid123 with your own LiU-ID).

You can access this directory from the LiU Linux environment, i.e. logged in on a on campus Linux computer room, or logged in using Remote SSH in VS Code or a remote desktop environment like ThinLinc.

Important! The web pages are only accessible (i.e. you can visit them from your browser) if your computer is on the LiU network, i.e. if you are using

  • a computer in a computer room on Campus
  • a computer connected to eduroam or LiU Wifi networks on Campus
  • a computer connected to the LiU network using VPN (see the support page on FortiClient VPN)
  • a browser while logged in via ThinLinc

Your web directory /wwwpub/liuid123 is mounted on demand. This means that if you only list the contents of the directory /wwwpub it is unlikely that you will see a directory for your LiU-ID unless you have accessed it recently.

Navigate to your directory directly by using cd /wwwpub/liuid123.

Subdirectories in /wwwpub/liuid123

Create subdirectories to keep your files tidy, e.g. one directory for each assignment and further subdirectories for each exercise. If you create the directory /wwwpub/liuid123/assignment1 its URL will be https://php-web.edu.liu.se/~liuid123/assignment1.

!!! Recent changes !!!

URLs or index files

On or about 2024-11-27 the computers serving wwwpub were updated and the settings changed in such a way that listing pages are no longer automatically generated for directories lacking an index.html file. This means that you have to create your own index.html file for each assignment which links directly to each exercise, or type the full URL to each exercise each time you want to navigate there. Example:

Assuming you have the directory structure below in your /wwwpub/liuid123 directory but don’t want to add an index.html file in the assignment1 directory you can still view your exercises directly using the following URLs:

  • Exercise 1: https://php-web.edu.liu.se/~liuid123/assignment1/exercise1/a1e1.html
  • Exercise 2: https://php-web.edu.liu.se/~liuid123/assignment1/exercise2/ (note: no need to specify index.html here since the server automatically serves that file if it exists)
  • Exercise 3: https://php-web.edu.liu.se/~liuid123/assignment1/exercise3/exercise3.html

However, it is recommended that you create an index.html file in each assignment directory which links to each exercise. This way you can simply navigate to https://php-web.edu.liu.se/~liuid123/assignment1/ to see all exercises for that assignment:

├── /wwwpub/liuid123/assignment1
│   ├── exercise1
│   │   ├── a1e1.html
│   │   ├── style.css
│   ├── exercise2
│   │   ├── index.html
│   │   ├── style.css
│   ├── exercise3
│   │   ├── exercise3.html
│   │   ├── style.css
│   ├── index.html ← You need to add this file

Given the directory structure above, [...]/assignment1/index.html could, for example, look something like below. Note that the path to the specific html file does not have to be provided for Exercise 2 on Assignment 1 here since that directory already has an index.html file and your browser will automatically display it when attempting to display the directory. (I.e. if you want your URL:s to look tidier, you can name the html file for every assignment index.html, unless otherwise specified.)

<html>
    <head>
	      <title>Assignment 1, Group your-group-number-in-webreg</title>
    </head>
    <body>
      <p><a href="exercise1/a1e1.html">Exercise 1</a></p>
      <p><a href="exercise2">Exercise 2</a></p>
      <p><a href="exercise3/exercise3.html">Exercise 3</a></p>
    </body>
</html>

Please note that you might also have to make sure that all your files have the correct permissions for the server to be able to serve them. This was an issue before november 2020 but permissions has automatically been set correctly since then and it is currently unclear whether this automation was lost in the update or not. If this seems to become an issue navigate to the root of your wwwpub and recursively change the file permissions for all your files:

$ cd /wwwpub/liuid123
$ chmod -R go+rX .

Case matters

Case matters. The LiU Linux filesystem is case-sensitive; i.e. the filename assignment1.html does not refer to the same file as the filename Assignment1.html. This is important to you because you will be publishing your assignments on servers using this filesystem.

To avoid future headaches, save your files using lower-case filenames without any spaces or non-ASCII characters.

  • Bad: Övning 1.html
  • Good: exercise1.html

LiU VPN (FortiClient) required outside of university networks

If your computer is not connected to the internet through a university network (e.g. if you are at home), you need to be connected to the university VPN to access any of the remote services (e.g. Remote SSH in VS Code, ThinLinc, RDP). Information about connecting to the university VPN can be found on this page: Forticlient VPN – Student VPN


Page contact: Johan Falkenjack
Last update: 2025-10-11