Hide menu
Valid for: HT24

Publishing web pages

Files and directories saved in directory /wwwpub/yourliuid accessed from the LiU Linux environment are made publicly available at the URL https://php-web.edu.liu.se/~yourliuid/ (replace yourliuid 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 ThinLinc. You can also access the directory from home using an SFTP client (see information below).

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/liuid is mounted on demand. This means that if you go to the directory /wwwpub and look at the directories there, it is unlikely that you will see yours.

Navigate to your directory directly using your SFTP client (use the “Go to folder…” menu item or similar function), or if you are using the LiU Linux environment, use cd /wwwpub/liuid rather than first navigating to /wwwpub then doing cd liuid.

Folders in /wwwpub/liuid

Create folders to keep your files tidy, e.g. one folder for each assignment and subfolders for each exercise if you want to keep it extra nice. If you create the folder /wwwpub/liuid/assignment1 its URL will be https://php-web.edu.liu.se/~yourliuid/assignment1.

!!! Recent changes !!!

On or about 2024-11-27 the machines 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. Example:

├── /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 folder 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/yourliuid
$ 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

Saving files to /wwwpub/liuid from home

If your are working on your own computer. You need to use an SFTP-client to upload your files to /wwwpub/liuid. Here are some suggestions:

Once you have installed your chosen client, connect to the server ssh.edu.liu.se and log in using your LiU-ID and password. If prompted, use the protocol SFTP and port 22.

Note: An alternative to working locally on your own compututer is to log in to the university Linux environment remotly. See the page Remote Access for more information.

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. SFTP, SSH, ThinLinc, RDP). Information about connect using the university VPN can be found on this page: Forticlient VPN – Student VPN


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