<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.ulyssis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thomasd</id>
	<title>ULYSSIS documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.ulyssis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thomasd"/>
	<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/Special:Contributions/Thomasd"/>
	<updated>2026-04-18T18:20:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1823</id>
		<title>Using (Fast)CGI for non-PHP websites</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1823"/>
		<updated>2023-09-11T19:13:17Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Python and Django */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You're not stuck with PHP if you want to make a dynamic website. You can use all sorts of frameworks and programming languages with ULYSSIS, as long as it has CGI or FastCGI support.&lt;br /&gt;
&lt;br /&gt;
If you want to use a certain programming language or framework, and you can't get it to work, don't hesitate to contact us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]. We will of course not write any code for you, but we can give you some pointers or directions.&lt;br /&gt;
&lt;br /&gt;
==CGI==&lt;br /&gt;
&lt;br /&gt;
CGI is a simple way to create a dynamic website. We use Apache's [http://httpd.apache.org/docs/2.4/mod/mod_cgid.html mod_cgid] to provide support for CGI. Note, however, that CGI is inefficient and&lt;br /&gt;
in general we recommend you to use a framework together with FastCGI. There are many frameworks, ranging from very simple and lightweight, to more complex and feature rich.&lt;br /&gt;
&lt;br /&gt;
If, for example, you want Apache to interpret all files with the extension &amp;lt;code&amp;gt;.cgi&amp;lt;/code&amp;gt; as CGI scripts, use the following &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file (to be placed in your &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder):&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler cgi-script .cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example of a very simple Python CGI script (called &amp;lt;code&amp;gt;hello.cgi&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
print 'Content-Type: text/plain\n'&lt;br /&gt;
print 'Hello world!'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CGI scripts need to be executable, otherwise they won't work:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x hello.cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FastCGI==&lt;br /&gt;
&lt;br /&gt;
We use Apache's [http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html mod_fcgid] to provide support for FastCGI.&lt;br /&gt;
&lt;br /&gt;
In order to use FastCGI, you will generally need a starter script specific to your programming languae, framework or application. Just do a web search for &amp;quot;''keyword'' mod_fcgid&amp;quot;, where ''keyword'' is the programming language, framework or application you're planning to use, and you will often find good instructions. We've included some examples below&lt;br /&gt;
&lt;br /&gt;
You'll want to treat this starter script as a &amp;lt;code&amp;gt;mod_fcgid&amp;lt;/code&amp;gt; script, and usually, you'll want to redirect everything to this script, so you can use an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file that looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replace ''starter.fcgi'' with the name of your starter script. Don't forget to make your starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
The starter script must be located in the same folder as the &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
{{warning|Warning!|Do not place sensitive files inside the web accessible folder. Make sure they are located in a folder outside the document root, or they will be downloadable through the webserver.}}&lt;br /&gt;
It is adviced to only place the fcgi starter script, &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; and static files (images, stylesheets) inside the document root.&lt;br /&gt;
&lt;br /&gt;
=== Startup time and persistency === &lt;br /&gt;
&lt;br /&gt;
It is important to keep in mind that our Apache webworkers will only run your start script when a request is made. As soon as that first request has been received, it will try and keep a few instances of your application around for future use. This of course affects how you restart your application after changes (see below), but also means that applications with a longer start up time (for example a language such as Python combined with a larger framework) will experience an initial slow request. This slow startup is obviously not a factor for faster languages such as Haskell, C++ or Go.&lt;br /&gt;
&lt;br /&gt;
Sadly, Apache is unable to have FastCGI processes persist beyond a reload or restart. This means in practice that every night around 6h25 when the logs are rotated, which requires Apache to be reloaded, all running fcgi processes will be gracefully terminated. The same thing happens when we make changes to the Apache configuration when a new website or user is added. &lt;br /&gt;
&lt;br /&gt;
For those who have a very high startup time and don't generate enough traffic to not experience issues with this behaviour, it's possible to use a [[Managing_Cron_jobs | cronjob]] to visit the website every night at 6h30 or 7h, or even hourly.&lt;br /&gt;
&lt;br /&gt;
===Restarting your application===&lt;br /&gt;
&lt;br /&gt;
If you've changed your application, you will need to restart it for these changes to take effect. However, because you're editing the application on a different server than where it is running, you do not have access to the running process. You'll have to create some sort of mechanism to restart the process.&lt;br /&gt;
&lt;br /&gt;
In the Django and Go examples below, the starter script has been written so that when it is changed, the application is automatically restarted within 1 second. The same mechanism can be applied to other Python sites. You can change the modification date without actually changing the contents of the starter script by using &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;touch starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace &amp;lt;code&amp;gt;starter.fcgi&amp;lt;/code&amp;gt; with the name of your starter script.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
==== Python and Django ====&lt;br /&gt;
&lt;br /&gt;
If you want to make a website using Python and [https://www.djangoproject.com/ Django], we recommend that you use a virtual environment. You can use the following steps to get up and running with Django on your ULYSSIS hosting account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Accessing shell servers over SSH|Log in to a shell server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a new virtualenv, you can create one in &amp;lt;code&amp;gt;~/.venv&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;python3 -m venv ~/.venv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Activate this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;. ~/.venv/bin/activate&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Install Django and flup for FastCGI inside of this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;pip install django flup6&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create a new Django project:&lt;br /&gt;
&amp;lt;pre&amp;gt;django-admin startproject mysite&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace ''mysite'' with your project's desired name.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Edit the allowed hosts in your Django project's settings, in &amp;lt;code&amp;gt;mysite/mysite/settings.py&amp;lt;/code&amp;gt;. Look for the line &amp;lt;code&amp;gt;ALLOWED_HOSTS = []&amp;lt;/code&amp;gt; and replace it with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALLOWED_HOSTS = [ 'username.ulyssis.be', 'username.studentenweb.org' ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use your ULYSSIS username in place of ''username''.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Put an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in your site's directory, e.g. the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create the starter script (replace &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; with org if you are an organization, and &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; with your ULYSSIS username):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;#!/home/user/username/.venv/bin/python&lt;br /&gt;
&lt;br /&gt;
import sys, os, os.path&lt;br /&gt;
from threading import Thread&lt;br /&gt;
&lt;br /&gt;
this_file = os.path.realpath(__file__)&lt;br /&gt;
&lt;br /&gt;
site_dir = '/home/user/username/mysite'&lt;br /&gt;
sys.path.insert(0, site_dir)&lt;br /&gt;
os.chdir(site_dir)&lt;br /&gt;
&lt;br /&gt;
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'&lt;br /&gt;
&lt;br /&gt;
def stat_thread():&lt;br /&gt;
    import time, os, signal&lt;br /&gt;
    start_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
    while True:&lt;br /&gt;
        cur_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
        if cur_mtime != start_mtime:&lt;br /&gt;
            os.kill(os.getpid(), signal.SIGTERM)&lt;br /&gt;
        time.sleep(1)&lt;br /&gt;
&lt;br /&gt;
Thread(target=stat_thread).start()&lt;br /&gt;
&lt;br /&gt;
from django.core.servers.basehttp import get_internal_wsgi_application&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
WSGIServer(get_internal_wsgi_application(), debug=False).run()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call this script &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Make the starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x mysite.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Go to ''username''.ulyssis.be (or whatever URL you chose to use), and it should show you the default &amp;quot;Welcome to Django&amp;quot; page.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide was based on, and you can find more information in the official Django documentation:&lt;br /&gt;
* [https://docs.djangoproject.com/en/stable/intro/tutorial01/ The Django tutorial]&lt;br /&gt;
* [https://flask.palletsprojects.com/en/1.1.x/deploying/fastcgi/ Flask documentation for FastCGI]&lt;br /&gt;
&lt;br /&gt;
==== Go ====&lt;br /&gt;
To make a website or web application in Go and host it on your ULYSSIS hosting account, you can use the standard library ''fcgi'' package. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [[Accessing shell servers over SSH|Log in to a shell server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Put an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in your site's directory (e.g. the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder) with a reference to your executable. Here we've chosen &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;, but you can adapt this to your liking.&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Write your code, and compile the binary to &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;. Below you can find a basic example of how to register two handlers (of which one is the fallback), then start the FastCGI client, and finally have a function (which is called as a goroutine) to check if the binary has been replaced so old processes don't stick around.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;go&amp;quot;&amp;gt;package main&lt;br /&gt;
&lt;br /&gt;
import (&lt;br /&gt;
	&amp;quot;fmt&amp;quot;&lt;br /&gt;
	&amp;quot;net/http&amp;quot;&lt;br /&gt;
	&amp;quot;net/http/fcgi&amp;quot;&lt;br /&gt;
	&amp;quot;os&amp;quot;&lt;br /&gt;
	&amp;quot;path/filepath&amp;quot;&lt;br /&gt;
	&amp;quot;time&amp;quot;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
func uri_interesting(w http.ResponseWriter, r *http.Request) {&lt;br /&gt;
	w.WriteHeader(http.StatusOK)&lt;br /&gt;
	fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;Oh, seems like this link isn't that interesting after all&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
	fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;Back to the &amp;lt;a href=\&amp;quot;/\&amp;quot;&amp;gt;Homepage&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func uri_default(w http.ResponseWriter, r *http.Request) {&lt;br /&gt;
	if r.URL.Path != &amp;quot;/&amp;quot; {&lt;br /&gt;
		w.WriteHeader(http.StatusNotFound)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;This page doesn't exist&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;Back to the &amp;lt;a href=\&amp;quot;/\&amp;quot;&amp;gt;Homepage&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
	} else {&lt;br /&gt;
		w.WriteHeader(http.StatusOK)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;Welcome to this testwebsite!&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;This website is written in Go but doesn't really do much.&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;Feel free to visit this &amp;lt;a href=\&amp;quot;/interesting/link\&amp;quot;&amp;gt;Interesting link&amp;lt;/a&amp;gt; or this &amp;lt;a href=\&amp;quot;/non-existent/link\&amp;quot;&amp;gt;non-existent link&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func main() {&lt;br /&gt;
	go check_selfreplacement()&lt;br /&gt;
	http.HandleFunc(&amp;quot;/interesting/link&amp;quot;, uri_interesting)&lt;br /&gt;
	http.HandleFunc(&amp;quot;/&amp;quot;, uri_default)&lt;br /&gt;
	if err := fcgi.Serve(nil, nil); err != nil {&lt;br /&gt;
		panic(err)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func check_selfreplacement() {&lt;br /&gt;
	fcgi_location, _ := os.Executable()&lt;br /&gt;
	fcgi_location, _ = filepath.EvalSymlinks(fcgi_location)&lt;br /&gt;
	start_stat, _ := os.Stat(fcgi_location)&lt;br /&gt;
	for {&lt;br /&gt;
		current_stat, _ := os.Stat(fcgi_location)&lt;br /&gt;
		if start_stat.ModTime() != current_stat.ModTime() {&lt;br /&gt;
			os.Exit(0)&lt;br /&gt;
		}&lt;br /&gt;
		time.Sleep(1 * time.Second)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to give this example a try, save it as &amp;lt;code&amp;gt;mysite.fcgi.go&amp;lt;/code&amp;gt; and then use &amp;lt;code&amp;gt;go build mysite.fcgi.go&amp;lt;/code&amp;gt; to compile it.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Visit your website to verify everything works&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1822</id>
		<title>Using (Fast)CGI for non-PHP websites</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1822"/>
		<updated>2023-09-11T19:11:52Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Python and Django */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You're not stuck with PHP if you want to make a dynamic website. You can use all sorts of frameworks and programming languages with ULYSSIS, as long as it has CGI or FastCGI support.&lt;br /&gt;
&lt;br /&gt;
If you want to use a certain programming language or framework, and you can't get it to work, don't hesitate to contact us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]. We will of course not write any code for you, but we can give you some pointers or directions.&lt;br /&gt;
&lt;br /&gt;
==CGI==&lt;br /&gt;
&lt;br /&gt;
CGI is a simple way to create a dynamic website. We use Apache's [http://httpd.apache.org/docs/2.4/mod/mod_cgid.html mod_cgid] to provide support for CGI. Note, however, that CGI is inefficient and&lt;br /&gt;
in general we recommend you to use a framework together with FastCGI. There are many frameworks, ranging from very simple and lightweight, to more complex and feature rich.&lt;br /&gt;
&lt;br /&gt;
If, for example, you want Apache to interpret all files with the extension &amp;lt;code&amp;gt;.cgi&amp;lt;/code&amp;gt; as CGI scripts, use the following &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file (to be placed in your &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder):&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler cgi-script .cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example of a very simple Python CGI script (called &amp;lt;code&amp;gt;hello.cgi&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
print 'Content-Type: text/plain\n'&lt;br /&gt;
print 'Hello world!'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CGI scripts need to be executable, otherwise they won't work:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x hello.cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FastCGI==&lt;br /&gt;
&lt;br /&gt;
We use Apache's [http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html mod_fcgid] to provide support for FastCGI.&lt;br /&gt;
&lt;br /&gt;
In order to use FastCGI, you will generally need a starter script specific to your programming languae, framework or application. Just do a web search for &amp;quot;''keyword'' mod_fcgid&amp;quot;, where ''keyword'' is the programming language, framework or application you're planning to use, and you will often find good instructions. We've included some examples below&lt;br /&gt;
&lt;br /&gt;
You'll want to treat this starter script as a &amp;lt;code&amp;gt;mod_fcgid&amp;lt;/code&amp;gt; script, and usually, you'll want to redirect everything to this script, so you can use an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file that looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replace ''starter.fcgi'' with the name of your starter script. Don't forget to make your starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
The starter script must be located in the same folder as the &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
{{warning|Warning!|Do not place sensitive files inside the web accessible folder. Make sure they are located in a folder outside the document root, or they will be downloadable through the webserver.}}&lt;br /&gt;
It is adviced to only place the fcgi starter script, &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; and static files (images, stylesheets) inside the document root.&lt;br /&gt;
&lt;br /&gt;
=== Startup time and persistency === &lt;br /&gt;
&lt;br /&gt;
It is important to keep in mind that our Apache webworkers will only run your start script when a request is made. As soon as that first request has been received, it will try and keep a few instances of your application around for future use. This of course affects how you restart your application after changes (see below), but also means that applications with a longer start up time (for example a language such as Python combined with a larger framework) will experience an initial slow request. This slow startup is obviously not a factor for faster languages such as Haskell, C++ or Go.&lt;br /&gt;
&lt;br /&gt;
Sadly, Apache is unable to have FastCGI processes persist beyond a reload or restart. This means in practice that every night around 6h25 when the logs are rotated, which requires Apache to be reloaded, all running fcgi processes will be gracefully terminated. The same thing happens when we make changes to the Apache configuration when a new website or user is added. &lt;br /&gt;
&lt;br /&gt;
For those who have a very high startup time and don't generate enough traffic to not experience issues with this behaviour, it's possible to use a [[Managing_Cron_jobs | cronjob]] to visit the website every night at 6h30 or 7h, or even hourly.&lt;br /&gt;
&lt;br /&gt;
===Restarting your application===&lt;br /&gt;
&lt;br /&gt;
If you've changed your application, you will need to restart it for these changes to take effect. However, because you're editing the application on a different server than where it is running, you do not have access to the running process. You'll have to create some sort of mechanism to restart the process.&lt;br /&gt;
&lt;br /&gt;
In the Django and Go examples below, the starter script has been written so that when it is changed, the application is automatically restarted within 1 second. The same mechanism can be applied to other Python sites. You can change the modification date without actually changing the contents of the starter script by using &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;touch starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace &amp;lt;code&amp;gt;starter.fcgi&amp;lt;/code&amp;gt; with the name of your starter script.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
==== Python and Django ====&lt;br /&gt;
&lt;br /&gt;
If you want to make a website using Python and [https://www.djangoproject.com/ Django], we recommend that you use a virtual environment. You can use the following steps to get up and running with Django on your ULYSSIS hosting account.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Accessing shell servers over SSH|Log in to a shell server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a new virtualenv, you can create one in &amp;lt;code&amp;gt;~/.venv&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;python3 -m venv ~/.venv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Activate this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;. ~/.venv/bin/activate&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Install Django and flup for FastCGI inside of this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;pip install django flup6&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create a new Django project:&lt;br /&gt;
&amp;lt;pre&amp;gt;django-admin startproject mysite&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace ''mysite'' with your project's desired name.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Edit the allowed hosts in your Django project's settings, in &amp;lt;code&amp;gt;mysite/mysite/settings.py&amp;lt;/code&amp;gt;. Look for the line &amp;lt;code&amp;gt;ALLOWED_HOSTS = []&amp;lt;/code&amp;gt; and replace it with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALLOWED_HOSTS = [ 'username.ulyssis.be', 'username.studentenweb.org' ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Put an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in your site's directory, e.g. the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create the starter script (replace &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; with org if you are an organization, and &amp;lt;code&amp;gt;username&amp;lt;/code&amp;gt; with your ULYSSIS username):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;#!/home/user/username/.venv/bin/python&lt;br /&gt;
&lt;br /&gt;
import sys, os, os.path&lt;br /&gt;
from threading import Thread&lt;br /&gt;
&lt;br /&gt;
this_file = os.path.realpath(__file__)&lt;br /&gt;
&lt;br /&gt;
site_dir = '/home/user/username/mysite'&lt;br /&gt;
sys.path.insert(0, site_dir)&lt;br /&gt;
os.chdir(site_dir)&lt;br /&gt;
&lt;br /&gt;
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'&lt;br /&gt;
&lt;br /&gt;
def stat_thread():&lt;br /&gt;
    import time, os, signal&lt;br /&gt;
    start_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
    while True:&lt;br /&gt;
        cur_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
        if cur_mtime != start_mtime:&lt;br /&gt;
            os.kill(os.getpid(), signal.SIGTERM)&lt;br /&gt;
        time.sleep(1)&lt;br /&gt;
&lt;br /&gt;
Thread(target=stat_thread).start()&lt;br /&gt;
&lt;br /&gt;
from django.core.servers.basehttp import get_internal_wsgi_application&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
WSGIServer(get_internal_wsgi_application(), debug=False).run()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call this script &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Make the starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x mysite.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Go to ''username''.ulyssis.be (or whatever URL you chose to use), and it should show you the default &amp;quot;Welcome to Django&amp;quot; page.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide was based on, and you can find more information in the official Django documentation:&lt;br /&gt;
* [https://docs.djangoproject.com/en/stable/intro/tutorial01/ The Django tutorial]&lt;br /&gt;
* [https://flask.palletsprojects.com/en/1.1.x/deploying/fastcgi/ Flask documentation for FastCGI]&lt;br /&gt;
&lt;br /&gt;
==== Go ====&lt;br /&gt;
To make a website or web application in Go and host it on your ULYSSIS hosting account, you can use the standard library ''fcgi'' package. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; [[Accessing shell servers over SSH|Log in to a shell server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Put an &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in your site's directory (e.g. the &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt; folder) with a reference to your executable. Here we've chosen &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;, but you can adapt this to your liking.&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Write your code, and compile the binary to &amp;lt;code&amp;gt;mysite.fcgi&amp;lt;/code&amp;gt;. Below you can find a basic example of how to register two handlers (of which one is the fallback), then start the FastCGI client, and finally have a function (which is called as a goroutine) to check if the binary has been replaced so old processes don't stick around.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;go&amp;quot;&amp;gt;package main&lt;br /&gt;
&lt;br /&gt;
import (&lt;br /&gt;
	&amp;quot;fmt&amp;quot;&lt;br /&gt;
	&amp;quot;net/http&amp;quot;&lt;br /&gt;
	&amp;quot;net/http/fcgi&amp;quot;&lt;br /&gt;
	&amp;quot;os&amp;quot;&lt;br /&gt;
	&amp;quot;path/filepath&amp;quot;&lt;br /&gt;
	&amp;quot;time&amp;quot;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
func uri_interesting(w http.ResponseWriter, r *http.Request) {&lt;br /&gt;
	w.WriteHeader(http.StatusOK)&lt;br /&gt;
	fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;Oh, seems like this link isn't that interesting after all&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
	fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;Back to the &amp;lt;a href=\&amp;quot;/\&amp;quot;&amp;gt;Homepage&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func uri_default(w http.ResponseWriter, r *http.Request) {&lt;br /&gt;
	if r.URL.Path != &amp;quot;/&amp;quot; {&lt;br /&gt;
		w.WriteHeader(http.StatusNotFound)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;This page doesn't exist&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;Back to the &amp;lt;a href=\&amp;quot;/\&amp;quot;&amp;gt;Homepage&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
	} else {&lt;br /&gt;
		w.WriteHeader(http.StatusOK)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;h1&amp;gt;Welcome to this testwebsite!&amp;lt;/h1&amp;gt;&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;&amp;lt;p&amp;gt;This website is written in Go but doesn't really do much.&amp;quot;)&lt;br /&gt;
		fmt.Fprintln(w, &amp;quot;Feel free to visit this &amp;lt;a href=\&amp;quot;/interesting/link\&amp;quot;&amp;gt;Interesting link&amp;lt;/a&amp;gt; or this &amp;lt;a href=\&amp;quot;/non-existent/link\&amp;quot;&amp;gt;non-existent link&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&amp;quot;)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func main() {&lt;br /&gt;
	go check_selfreplacement()&lt;br /&gt;
	http.HandleFunc(&amp;quot;/interesting/link&amp;quot;, uri_interesting)&lt;br /&gt;
	http.HandleFunc(&amp;quot;/&amp;quot;, uri_default)&lt;br /&gt;
	if err := fcgi.Serve(nil, nil); err != nil {&lt;br /&gt;
		panic(err)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
func check_selfreplacement() {&lt;br /&gt;
	fcgi_location, _ := os.Executable()&lt;br /&gt;
	fcgi_location, _ = filepath.EvalSymlinks(fcgi_location)&lt;br /&gt;
	start_stat, _ := os.Stat(fcgi_location)&lt;br /&gt;
	for {&lt;br /&gt;
		current_stat, _ := os.Stat(fcgi_location)&lt;br /&gt;
		if start_stat.ModTime() != current_stat.ModTime() {&lt;br /&gt;
			os.Exit(0)&lt;br /&gt;
		}&lt;br /&gt;
		time.Sleep(1 * time.Second)&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If you want to give this example a try, save it as &amp;lt;code&amp;gt;mysite.fcgi.go&amp;lt;/code&amp;gt; and then use &amp;lt;code&amp;gt;go build mysite.fcgi.go&amp;lt;/code&amp;gt; to compile it.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Visit your website to verify everything works&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1751</id>
		<title>Webserver changes summer 2022</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1751"/>
		<updated>2022-09-05T23:35:29Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists the changes to the webservers of ULYSSIS in the summer of 2022, and how you can prepare for it. If any of these&lt;br /&gt;
instructions are not clear to you, or if you have some more questions about the changes, '''don't hesitate to e-mail us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]'''.&lt;br /&gt;
&lt;br /&gt;
== When are the changes planned? ==&lt;br /&gt;
&lt;br /&gt;
These changes are planned in the weekend of 17 and 18 September.&lt;br /&gt;
&lt;br /&gt;
== What will change? ==&lt;br /&gt;
&lt;br /&gt;
We will upgrade the Ubuntu release on our servers from 20.04 LTS to 22.04 LTS. This will include newer version of many services. An overview of the most important version changes can be found below. For other services/packages, you can always use the [https://packages.ubuntu.com/ Ubuntu Package Search]. The distribution name for Ubuntu 22.04 LTS is &amp;quot;jammy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* PHP will be updated from 7.4 to 8.1&lt;br /&gt;
* PostgreSQL will be updated from 12 to 14&lt;br /&gt;
* MariaDB (MySQL) will be updated from 10.3.22 to 10.6.7&lt;br /&gt;
* Python will be updated from 3.8 to 3.10&lt;br /&gt;
&lt;br /&gt;
If you host your own PHP website, you might want to check out these guides:&lt;br /&gt;
* [https://www.php.net/manual/en/migration80.php Migrating from PHP 7.4.x to PHP 8.0.x]&lt;br /&gt;
* [https://www.php.net/manual/en/migration81.php Migrating from PHP 8.0.x to PHP 8.1.x]&lt;br /&gt;
&lt;br /&gt;
Note that any existing Python virtual environments in use will need to be recreated in order to function properly.&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1750</id>
		<title>Webserver changes summer 2022</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1750"/>
		<updated>2022-09-05T23:34:31Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists the changes to the webservers of ULYSSIS in the summer of 2022, and how you can prepare for it. If any of these&lt;br /&gt;
instructions are not clear to you, or if you have some more questions about the changes, '''don't hesitate to e-mail us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]'''.&lt;br /&gt;
&lt;br /&gt;
== When are the changes planned? ==&lt;br /&gt;
&lt;br /&gt;
These changes are planned in the weekend of 17 and 18 September.&lt;br /&gt;
&lt;br /&gt;
== What will change? ==&lt;br /&gt;
&lt;br /&gt;
We will upgrade the Ubuntu release on our servers from 20.04 LTS to 22.04 LTS. This will include newer version of many services. An overview of the most important version changes can be found below. For other services/packages, you can always use the [https://packages.ubuntu.com/ Ubuntu Package Search]. The distribution name for Ubuntu 22.04 LTS is &amp;quot;jammy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* PHP will be updated from 7.4 to 8.1. If you host your own PHP website, you might want to check out these guides:&lt;br /&gt;
** [https://www.php.net/manual/en/migration80.php Migrating from PHP 7.4.x to PHP 8.0.x]&lt;br /&gt;
** [https://www.php.net/manual/en/migration81.php Migrating from PHP 8.0.x to PHP 8.1.x]&lt;br /&gt;
* PostgreSQL will be updated from 12 to 14&lt;br /&gt;
* MariaDB (MySQL) will be updated from 10.3.22 to 10.6.7&lt;br /&gt;
* Python will be updated from 3.8 to 3.10&lt;br /&gt;
&lt;br /&gt;
Note that any existing Python virtual environments in use will need to be recreated in order to function properly.&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1742</id>
		<title>Webserver changes summer 2022</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Webserver_changes_summer_2022&amp;diff=1742"/>
		<updated>2022-08-17T15:36:05Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: Created page with &amp;quot;This page lists the changes to the webservers of ULYSSIS in the summer of 2022, and how you can prepare for it. If any of these instructions are not clear to you, or if you ha...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists the changes to the webservers of ULYSSIS in the summer of 2022, and how you can prepare for it. If any of these&lt;br /&gt;
instructions are not clear to you, or if you have some more questions about the changes, '''don't hesitate to e-mail us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]'''.&lt;br /&gt;
&lt;br /&gt;
== When are the changes planned? ==&lt;br /&gt;
&lt;br /&gt;
todo&lt;br /&gt;
&lt;br /&gt;
== What will change? ==&lt;br /&gt;
&lt;br /&gt;
We will upgrade the Ubuntu release on our servers from 20.04 LTS to 22.04 LTS. This will include newer version of many services. An overview of the most important version changes can be found below. For other services/packages, you can always use the [https://packages.ubuntu.com/ Ubuntu Package Search]. The distribution name for Ubuntu 22.04 LTS is &amp;quot;jammy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* PHP will be updated from 7.4 to 8.1&lt;br /&gt;
* PostgreSQL will be updated from 12 to 14&lt;br /&gt;
* MariaDB (MySQL) will be updated from 10.3.22 to 10.6.7&lt;br /&gt;
* Python will be updated from 3.8 to 3.10&lt;br /&gt;
&lt;br /&gt;
Note that any existing Python virtual environments in use will need to be recreated in order to function properly.&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1577</id>
		<title>Getting Apache logs</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1577"/>
		<updated>2021-10-09T13:40:18Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can find all your Apache logs (like &amp;lt;code&amp;gt;access.log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;error.log&amp;lt;/code&amp;gt;) on all of our shell servers in the directory &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt;. For more information on how to access your files, please visit [[Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
==Using Cyberduck (graphical interface)==&lt;br /&gt;
&lt;br /&gt;
You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per [[Accessing your files]], click on &amp;quot;Go&amp;quot; on the top bar and then click &amp;quot;Go to Folder...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 1.png]]&lt;br /&gt;
&lt;br /&gt;
Then enter &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt; as path name (replace ''username'' with your own username):&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 2.png]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Go&amp;quot;, you will see a directory for each of your websites, containing their Apache logs.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 3.png]]&lt;br /&gt;
&lt;br /&gt;
You can view a log file by selecting it and pressing the &amp;quot;Edit&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck Edit button.png]]&lt;br /&gt;
&lt;br /&gt;
After a few days, logs will be compressed into a &amp;lt;code&amp;gt;bz2&amp;lt;/code&amp;gt; file. You can download such a file and open it with [https://www.7-zip.org/ 7-Zip].&lt;br /&gt;
&lt;br /&gt;
==Using the command line==&lt;br /&gt;
&lt;br /&gt;
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:&lt;br /&gt;
 username@ssh1:~$ cd /var/log/apache_user/username&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ ls&lt;br /&gt;
 username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls&lt;br /&gt;
 access-2014-05-07.log error-2014-05-07.log&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log &lt;br /&gt;
 [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico&lt;br /&gt;
&lt;br /&gt;
If you can't find your username inside of &amp;lt;code&amp;gt;/var/log/apache_user&amp;lt;/code&amp;gt;, don't worry. If you enter it with &amp;lt;code&amp;gt;cd username&amp;lt;/code&amp;gt;, it will automatically appear.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_Edit_button.png&amp;diff=1576</id>
		<title>File:Getting Apache Logs - Cyberduck Edit button.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_Edit_button.png&amp;diff=1576"/>
		<updated>2021-10-09T13:20:17Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Log file overview with edit button&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Overview&amp;diff=1562</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Overview&amp;diff=1562"/>
		<updated>2021-09-07T21:21:09Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* CMSs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background:#f9f9f9;border:1px solid #ddd;font-size:95%;padding:1.5em;&amp;quot;&amp;gt;&lt;br /&gt;
Welcome to our documentation website. Many of the common procedures and issues our users experience are described here. If you still encounter problems we haven't covered or you just can't seem to get things to work, even though you followed one of our manuals, feel free to contact us on ulyssis@ulyssis.org for personal support.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
== Account ==&lt;br /&gt;
* [[Registering a new account]]&lt;br /&gt;
* [[Renewing your account]]&lt;br /&gt;
* [[Transferring your account]]&lt;br /&gt;
* [[Resetting your password]]&lt;br /&gt;
* [[Reducing disk usage|Help, my account uses too much disk space]]&lt;br /&gt;
* [[Why do I have to pay 0.00 euro and how?]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:45%;float:left&amp;quot;&amp;gt;&lt;br /&gt;
== Files ==&lt;br /&gt;
* [[Accessing your files]]&lt;br /&gt;
* [[Transferring files over SFTP]]&lt;br /&gt;
* [[Making Backups]]&lt;br /&gt;
* [[Secure file permissions]]&lt;br /&gt;
* [[Reducing disk usage]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Webserver ==&lt;br /&gt;
* [[Webserver changes summer 2020]]&lt;br /&gt;
* [[Using your webspace]]&lt;br /&gt;
* [[Using (Fast)CGI for non-PHP websites]]&lt;br /&gt;
* [[Getting Apache logs]]&lt;br /&gt;
* [[Managing PHP errors]]&lt;br /&gt;
* [[Setting PHP options]]&lt;br /&gt;
* [[Sending email from websites]]&lt;br /&gt;
* [[Adding domain names|Adding domain names (.be, .com, .org, ...)]]&lt;br /&gt;
* [[Getting SSL/TLS|Getting SSL/TLS (HTTPS security)]]&lt;br /&gt;
* [[Shibboleth|Shibboleth (Centrale KU Leuven Login)]]&lt;br /&gt;
* [[Claiming a port]]&lt;br /&gt;
* [[ULYSSIS security measures]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:45%;float:left&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mail ==&lt;br /&gt;
* [[Introduction to ULYSSIS email]]&lt;br /&gt;
* [[Mailbox]]&lt;br /&gt;
* [[Forwarders]]&lt;br /&gt;
* [[Using a forwarder as an alias]]&lt;br /&gt;
* [[Add an alias in Gmail]]&lt;br /&gt;
* [[Add an alias in Hotmail/Outlook]]&lt;br /&gt;
* [[Add an alias in Thunderbird]]&lt;br /&gt;
* [[Fetch your KU Leuven email into another email address]]&lt;br /&gt;
* [[Spam]]&lt;br /&gt;
* [[ULYSSIS security measures]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMSs ==&lt;br /&gt;
* [[Software Version Checker]]&lt;br /&gt;
* [[Setting up WordPress]]&lt;br /&gt;
* [[Setting up Drupal]]&lt;br /&gt;
* [[Setting up Joomla]]&lt;br /&gt;
* [[Setting up MediaWiki]]&lt;br /&gt;
* [[Updating WordPress]]&lt;br /&gt;
* [[Updating MediaWiki]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:45%;float:left&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security &amp;amp; anti-spam ==&lt;br /&gt;
* [[Secure file permissions]]&lt;br /&gt;
* [[Software Version Checker]]&lt;br /&gt;
* [[Preventing spam on Wordpress]]&lt;br /&gt;
* [[Preventing spam on Joomla]]&lt;br /&gt;
* [[Preventing spam on Drupal]]&lt;br /&gt;
* [[Preventing spam on MediaWiki]]&lt;br /&gt;
* [[Securing MediaWiki using Centrale KU Leuven Login]]&lt;br /&gt;
* [[ULYSSIS security measures]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Databases ==&lt;br /&gt;
* [[Using PostgreSQL]]&lt;br /&gt;
* [[Using MySQL]]&lt;br /&gt;
* [[Using PHPMyAdmin]]&lt;br /&gt;
* [[Using PHPPgAdmin]]&lt;br /&gt;
* [[Using Adminer]]&lt;br /&gt;
* [[Making Backups]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:45%;float:left&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell ==&lt;br /&gt;
* [[Accessing your files]]&lt;br /&gt;
* [[Transferring files over SFTP]]&lt;br /&gt;
* [[Accessing shell servers over SSH]]&lt;br /&gt;
* [[ULYSSIS public IRC]]&lt;br /&gt;
* [[Useful Linux Commands]]&lt;br /&gt;
* [[Managing Cron jobs]]&lt;br /&gt;
* [[Claiming a port]]&lt;br /&gt;
* [[Installing packages]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
* [[GitLab]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;width:45%;float:left&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ULYSSIS Public Services  ==&lt;br /&gt;
* [[ULYSSIS public IRC]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:45%;float:left;padding-right:10px;&amp;quot;&amp;gt;&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
* [[Using the kulemt package]]&lt;br /&gt;
* [[Exporting your KU Leuven class schedule and calendar]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1561</id>
		<title>Updating MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1561"/>
		<updated>2021-09-07T21:09:50Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Finalizing the update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MediaWiki project provides an official [https://www.mediawiki.org/wiki/Manual:Upgrading wiki page] which explains the procedure to update a wiki. Unfortunately, their instructions are complex, and the page contains a lot of information that is outdated or irrelevant for our users. To make it easier for our users to update, this documentation page aims to be more accessible and easier to understand. However, this page is not an authoritative source on the subject. If the instructions on this page are unclear at any point, you should always refer back to the official instructions.&lt;br /&gt;
&lt;br /&gt;
{{info|In this guide, we assume you are familiar with the files on your ULYSSIS account. If you don't know how to access these files, please read [[Accessing your files]] first.}}&lt;br /&gt;
&lt;br /&gt;
== Downloading the right version ==&lt;br /&gt;
To start updating MediaWiki, you will need to download the archive file of the version you want to update to. If you did not receive an email from our [[Software Version Checker]], follow the  instructions in the next subsection. Otherwise, you can skip to the subsection [[#Downloading the right version using the Software Version Checker | Downloading the right version using the Software Version Checker]].&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version based on your wiki ===&lt;br /&gt;
You can find your current MediaWiki version by going to the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page on your wiki (simply paste this in the search box) and looking for the &amp;quot;MediaWiki&amp;quot; version under &amp;quot;Installed software&amp;quot;. For example, for this wiki, you can find the current version at [[Special:Version]]. At the time of writing, it looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Installed software.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
A table of all recent MediaWiki versions can be found on [https://en.wikipedia.org/wiki/MediaWiki_version_history wikipedia]. Currently supported versions are indicated by a green or yellow color in the first column. To determine which version you want to download, follow these steps:&lt;br /&gt;
* If the ''branch'' of your version ('''the first two numbers''', like &amp;lt;code&amp;gt;1.xx&amp;lt;/code&amp;gt;) is currently supported (green or yellow), you should choose the latest version for this branch. For example, for version 1.35.3, the branch is 1.35.&lt;br /&gt;
* If this branch is not supported anymore, you should choose the most recent LTS branch. This is indicated by '''(LTS)''' in the second column. '''Make sure this LTS branch is not older than your current branch!'''&lt;br /&gt;
* If the most recent LTS branch is older than your current branch, you should choose the newest supported branch (green).&lt;br /&gt;
&lt;br /&gt;
Now, click on the link of the branch you want to download. This will redirect you to a page with information about this version. The first paragraph on this page contains a link to &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt;. Download this archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version using the Software Version Checker ===&lt;br /&gt;
The email you received will contain a link to the correct MediaWiki version. This link looks something like:&lt;br /&gt;
 https://releases.wikimedia.org/mediawiki/1.xx/mediawiki-core-1.xx.yy.tar.gz&lt;br /&gt;
&lt;br /&gt;
Simply click this link to download the archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
== Renaming the old installation ==&lt;br /&gt;
An important step in the update process is to rename the old installation directory. This way, you can simply copy your data from the old installation directory to the new installation directory during the update. Additionally, you can easily restore your old wiki if something goes wrong.&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this, is to '''rename''' your wiki location (the directory containing your &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; configuration file) to a new directory. If you don't know how to access your files on your ULYSSIS account, refer to [[Accessing your files]] for easy instructions. For example, if &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; is stored in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, you should '''rename''' the wiki folder to &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installing the new files ==&lt;br /&gt;
Now, you will need to upload the &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; file you downloaded in step 1 next to the old installation directory. For example, if your old installation directory is located in &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt;, upload &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;www/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After uploading, you can extract the archive file on the server by using the Cyberduck &amp;quot;Expand Archive&amp;quot; feature. Simply right click the archive and click &amp;quot;Expand Archive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck expand.png|thumb|center]]&lt;br /&gt;
 &lt;br /&gt;
This will create a directory named &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt;. Rename this directory to the original name of your wiki directory on your ULYSSIS account. For example, if the original name was &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;, rename this directory from &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;. This can be done using Cyberduck by right clicking the directory and clicking &amp;quot;Rename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck rename.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Finally, you need to move certain other other files and directories from the '''old''' directory to the '''new''' directory. The easiest way to do this using Cyberduck is by going up a directory (so if your wiki is in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, go to &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;), and drag-and-dropping the necessary files and directories. For example, moving &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; by drag-and-dropping it from &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 1.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Although the exact files you need to move are different depending on your wiki, here are some suggestions from the [https://www.mediawiki.org/wiki/Manual:Upgrading#Other_files official instructions]:&lt;br /&gt;
* &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;, which contains your old configuration settings.&lt;br /&gt;
* The &amp;lt;code&amp;gt;images/&amp;lt;/code&amp;gt; directory, containing the uploaded files to the wiki. Because the new wiki directory already contains an (empty) &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory, you need to delete that one first by right-clicking on it and pressing &amp;quot;Delete&amp;quot;. Make sure to only delete the &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory in the '''new''' wiki directory. Then you can move the old &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory into the new wiki directory.&lt;br /&gt;
* Custom extensions from within the &amp;lt;code&amp;gt;extensions/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default extensions that are bundled with the new MediaWiki version.&lt;br /&gt;
* Custom skins from within the &amp;lt;code&amp;gt;skins/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default skins that are bundled with the new MediaWiki version.&lt;br /&gt;
* Any &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file, if present. '''Make sure you can view hidden files'''; to enable this for Cyberduck, you can look at [[Accessing_your_files#Viewing_hidden_files|Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
== Updating extensions ==&lt;br /&gt;
If you use any extensions that are not bundled with MediaWiki by default, you should update them too. A list of bundled extensions can be found at https://www.mediawiki.org/wiki/Bundled_extensions_and_skins, these extensions will be updated automatically. However, for example, you might have the ULYSSIS extensions [[Securing MediaWiki using Centrale KU Leuven Login|MediaWikiShibboleth]] or [https://github.com/ULYSSIS-KUL/CompressUploads CompressUploads] installed. As with MediaWiki itself, you can find the versions of your installed extensions on the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page, under &amp;quot;Installed extensions&amp;quot;. Extensions will often link to a website where you can download the latest versions. For example, for this wiki, you can find the installed extensions at [[Special:Version]]. At the time of writing, it looks like this: &lt;br /&gt;
&lt;br /&gt;
[[File:Installed extensions.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
Because the update instructions are different for each extension, you will have to refer to the update instructions of the extension you want to update. However, most extensions follow the same template as the MediaWiki upgrade itself:&lt;br /&gt;
* Downloading the latest version: make sure to download the correct update for your new MediaWiki version.&lt;br /&gt;
* Making a backup of the extension: you should already have a backup in the directory you created in step 2.&lt;br /&gt;
* Extracting the archive files: similar to the MediaWiki tar.gz archive files, you might have to copy the new extension files to a directory in the new &amp;lt;code&amp;gt;extension/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Finalizing the update ==&lt;br /&gt;
The final step in the update process is to update the database structure of your wiki. Your MediaWiki installation contains a script, called &amp;lt;code&amp;gt;update.php&amp;lt;/code&amp;gt;, to perform the necessary database upgrades. This script can be executed using the Cyberduck &amp;quot;Send Command&amp;quot; feature.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck send command.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Enter the following command in the pop-up box (of course, replace &amp;lt;code&amp;gt;&amp;lt;wiki installation location&amp;gt;&amp;lt;/code&amp;gt; with the location of your new installation):&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;wiki installation location&amp;gt;/maintenance/update.php&lt;br /&gt;
&lt;br /&gt;
For example, if your wiki is located at &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, the command should be as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Send&amp;quot;, the command will be executed on the server. If everything went well, you should see a lot of output, ending with something like:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update output.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
If you get the error &amp;lt;code&amp;gt;Could not open input file&amp;lt;/code&amp;gt;, you might have misspelled the installation location. Double check the path to make sure everything is correct.&lt;br /&gt;
&lt;br /&gt;
If you encounter any other errors while executing the script, you could try taking a look at the [https://www.mediawiki.org/wiki/Manual:Upgrading#Command_line_2 official instructions]. If this does not resolve your problems, feel free to send us an email. We will try to assist you in completing the update.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You successfully updated MediaWiki. Still, there are two more important steps you must perform:&lt;br /&gt;
* Test your new MediaWiki installation: make sure all basic functionality (viewing, editing pages, file upload) works and all your extensions function properly.&lt;br /&gt;
* Delete the old installation: you should remove the previously created &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt; directory, using the command line or through a GUI. A simple GUI explanation can be found on [[Accessing_your_files#Creating_and_Deleting_files_and_folders|Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
== If something goes wrong ==&lt;br /&gt;
&lt;br /&gt;
If something goes wrong during the update so your wiki doesn't work anymore, you can revert the process to go back to your old wiki. If you already moved files or directories such as &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;, move them back into &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt;. Then delete &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt; and rename &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt; back to &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;. Your old wiki is then restored so you can retry the update process. If you still run into any trouble, feel free to email us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org].&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1538</id>
		<title>Updating MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1538"/>
		<updated>2021-08-31T23:18:32Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Installing the new files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MediaWiki project provides an official [https://www.mediawiki.org/wiki/Manual:Upgrading wiki page] which explains the procedure to update a wiki. Unfortunately, their instructions are complex, and the page contains a lot of information that is outdated or irrelevant for our users. To make it easier for our users to update, this documentation page aims to be more accessible and easier to understand. However, this page is not an authoritative source on the subject. If the instructions on this page are unclear at any point, you should always refer back to the official instructions.&lt;br /&gt;
&lt;br /&gt;
{{info|In this guide, we assume you are familiar with the files on your ULYSSIS account. If you don't know how to access these files, please read [[Accessing your files]] first.}}&lt;br /&gt;
&lt;br /&gt;
== Downloading the right version ==&lt;br /&gt;
To start updating MediaWiki, you will need to download the archive file of the version you want to update to. If you did not receive an email from our [[Software Version Checker]], follow the  instructions in the next subsection. Otherwise, you can skip to the subsection [[#Downloading the right version using the Software Version Checker | Downloading the right version using the Software Version Checker]].&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version based on your wiki ===&lt;br /&gt;
You can find your current MediaWiki version by going to the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page on your wiki (simply paste this in the search box) and looking for the &amp;quot;MediaWiki&amp;quot; version under &amp;quot;Installed software&amp;quot;. For example, for this wiki, you can find the current version at [[Special:Version]]. At the time of writing, it looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Installed software.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
A table of all recent MediaWiki versions can be found on [https://en.wikipedia.org/wiki/MediaWiki_version_history wikipedia]. Currently supported versions are indicated by a green or yellow color in the first column. To determine which version you want to download, follow these steps:&lt;br /&gt;
* If the ''branch'' of your version ('''the first two numbers''', like &amp;lt;code&amp;gt;1.xx&amp;lt;/code&amp;gt;) is currently supported (green or yellow), you should choose the latest version for this branch. For example, for version 1.35.3, the branch is 1.35.&lt;br /&gt;
* If this branch is not supported anymore, you should choose the most recent LTS branch. This is indicated by '''(LTS)''' in the second column. '''Make sure this LTS branch is not older than your current branch!'''&lt;br /&gt;
* If the most recent LTS branch is older than your current branch, you should choose the newest supported branch (green).&lt;br /&gt;
&lt;br /&gt;
Now, click on the link of the branch you want to download. This will redirect you to a page with information about this version. The first paragraph on this page contains a link to &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt;. Download this archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version using the Software Version Checker ===&lt;br /&gt;
The email you received will contain a link to the correct MediaWiki version. This link looks something like:&lt;br /&gt;
 https://releases.wikimedia.org/mediawiki/1.xx/mediawiki-core-1.xx.yy.tar.gz&lt;br /&gt;
&lt;br /&gt;
Simply click this link to download the archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
== Renaming the old installation ==&lt;br /&gt;
An important step in the update process is to rename the old installation directory. This way, you can simply copy your data from the old installation directory to the new installation directory during the update. Additionally, you can easily restore your old wiki if something goes wrong.&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this, is to '''rename''' your wiki location (the directory containing your &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; configuration file) to a new directory. If you don't know how to access your files on your ULYSSIS account, refer to [[Accessing your files]] for easy instructions. For example, if &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; is stored in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, you should '''rename''' the wiki folder to &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installing the new files ==&lt;br /&gt;
Now, you will need to upload the &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; file you downloaded in step 1 next to the old installation directory. For example, if your old installation directory is located in &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt;, upload &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;www/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After uploading, you can extract the archive file on the server by using the Cyberduck &amp;quot;Expand Archive&amp;quot; feature. Simply right click the archive and click &amp;quot;Expand Archive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck expand.png|thumb|center]]&lt;br /&gt;
 &lt;br /&gt;
This will create a directory named &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt;. Rename this directory to the original name of your wiki directory on your ULYSSIS account. For example, if the original name was &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;, rename this directory from &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;. This can be done using Cyberduck by right clicking the directory and clicking &amp;quot;Rename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck rename.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Finally, you need to move certain other other files and directories from the '''old''' directory to the '''new''' directory. The easiest way to do this using Cyberduck is by going up a directory (so if your wiki is in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, go to &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;), and drag-and-dropping the necessary files and directories. For example, moving &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; by drag-and-dropping it from &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 1.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Although the exact files you need to move are different depending on your wiki, here are some suggestions from the [https://www.mediawiki.org/wiki/Manual:Upgrading#Other_files official instructions]:&lt;br /&gt;
* &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;, which contains your old configuration settings.&lt;br /&gt;
* The &amp;lt;code&amp;gt;images/&amp;lt;/code&amp;gt; directory, containing the uploaded files to the wiki. Because the new wiki directory already contains an (empty) &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory, you need to delete that one first by right-clicking on it and pressing &amp;quot;Delete&amp;quot;. Make sure to only delete the &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory in the '''new''' wiki directory. Then you can move the old &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory into the new wiki directory.&lt;br /&gt;
* Custom extensions from within the &amp;lt;code&amp;gt;extensions/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default extensions that are bundled with the new MediaWiki version.&lt;br /&gt;
* Custom skins from within the &amp;lt;code&amp;gt;skins/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default skins that are bundled with the new MediaWiki version.&lt;br /&gt;
* Any &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file, if present. '''Make sure you can view hidden files'''; to enable this for Cyberduck, you can look at [[Accessing_your_files#Viewing_hidden_files|Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
== Updating extensions ==&lt;br /&gt;
If you use any extensions that are not bundled with MediaWiki by default, you should update them too. A list of bundled extensions can be found at https://www.mediawiki.org/wiki/Bundled_extensions_and_skins, these extensions will be updated automatically. However, for example, you might have the ULYSSIS extensions [[Securing MediaWiki using Centrale KU Leuven Login|MediaWikiShibboleth]] or [https://github.com/ULYSSIS-KUL/CompressUploads CompressUploads] installed. As with MediaWiki itself, you can find the versions of your installed extensions on the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page, under &amp;quot;Installed extensions&amp;quot;. Extensions will often link to a website where you can download the latest versions. For example, for this wiki, you can find the installed extensions at [[Special:Version]]. At the time of writing, it looks like this: &lt;br /&gt;
&lt;br /&gt;
[[File:Installed extensions.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
Because the update instructions are different for each extension, you will have to refer to the update instructions of the extension you want to update. However, most extensions follow the same template as the MediaWiki upgrade itself:&lt;br /&gt;
* Downloading the latest version: make sure to download the correct update for your new MediaWiki version.&lt;br /&gt;
* Making a backup of the extension: you should already have a backup in the directory you created in step 2.&lt;br /&gt;
* Extracting the archive files: similar to the MediaWiki tar.gz archive files, you might have to copy the new extension files to a directory in the new &amp;lt;code&amp;gt;extension/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Finalizing the update ==&lt;br /&gt;
The final step in the update process is to update the database structure of your wiki. Your MediaWiki installation contains a script, called &amp;lt;code&amp;gt;update.php&amp;lt;/code&amp;gt;, to perform the necessary database upgrades. This script can be executed using the Cyberduck &amp;quot;Send Command&amp;quot; feature.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck send command.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Enter the following command in the pop-up box (of course, replace &amp;lt;code&amp;gt;&amp;lt;wiki installation location&amp;gt;&amp;lt;/code&amp;gt; with the location of your new installation):&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;wiki installation location&amp;gt;/maintenance/update.php&lt;br /&gt;
&lt;br /&gt;
For example, if your wiki is located at &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, the command should be as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Send&amp;quot;, the command will be executed on the server. If everything went well, you should see a lot of output, ending with something like:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update output.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
If you get the error &amp;lt;code&amp;gt;Could not open input file&amp;lt;/code&amp;gt;, you might have misspelled the installation location. Double check the path to make sure everything is correct.&lt;br /&gt;
&lt;br /&gt;
If you encounter any other errors while executing the script, you could try taking a look at the [https://www.mediawiki.org/wiki/Manual:Upgrading#Command_line_2 official instructions]. If this does not resolve your problems, feel free to send us an email. We will try to assist you in completing the update.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You successfully updated MediaWiki. Still, there are two more important steps you must perform:&lt;br /&gt;
* Test your new MediaWiki installation: make sure all basic functionality (viewing, editing pages, file upload) works and all your extensions function properly.&lt;br /&gt;
* Delete the old installation: you should remove the previously created &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt; directory, using the command line or through a GUI. A simple GUI explanation can be found on [[Accessing_your_files#Creating_and_Deleting_files_and_folders|Accessing your files]].&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1537</id>
		<title>Updating MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Updating_MediaWiki&amp;diff=1537"/>
		<updated>2021-08-31T23:16:31Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MediaWiki project provides an official [https://www.mediawiki.org/wiki/Manual:Upgrading wiki page] which explains the procedure to update a wiki. Unfortunately, their instructions are complex, and the page contains a lot of information that is outdated or irrelevant for our users. To make it easier for our users to update, this documentation page aims to be more accessible and easier to understand. However, this page is not an authoritative source on the subject. If the instructions on this page are unclear at any point, you should always refer back to the official instructions.&lt;br /&gt;
&lt;br /&gt;
{{info|In this guide, we assume you are familiar with the files on your ULYSSIS account. If you don't know how to access these files, please read [[Accessing your files]] first.}}&lt;br /&gt;
&lt;br /&gt;
== Downloading the right version ==&lt;br /&gt;
To start updating MediaWiki, you will need to download the archive file of the version you want to update to. If you did not receive an email from our [[Software Version Checker]], follow the  instructions in the next subsection. Otherwise, you can skip to the subsection [[#Downloading the right version using the Software Version Checker | Downloading the right version using the Software Version Checker]].&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version based on your wiki ===&lt;br /&gt;
You can find your current MediaWiki version by going to the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page on your wiki (simply paste this in the search box) and looking for the &amp;quot;MediaWiki&amp;quot; version under &amp;quot;Installed software&amp;quot;. For example, for this wiki, you can find the current version at [[Special:Version]]. At the time of writing, it looks like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Installed software.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
A table of all recent MediaWiki versions can be found on [https://en.wikipedia.org/wiki/MediaWiki_version_history wikipedia]. Currently supported versions are indicated by a green or yellow color in the first column. To determine which version you want to download, follow these steps:&lt;br /&gt;
* If the ''branch'' of your version ('''the first two numbers''', like &amp;lt;code&amp;gt;1.xx&amp;lt;/code&amp;gt;) is currently supported (green or yellow), you should choose the latest version for this branch. For example, for version 1.35.3, the branch is 1.35.&lt;br /&gt;
* If this branch is not supported anymore, you should choose the most recent LTS branch. This is indicated by '''(LTS)''' in the second column. '''Make sure this LTS branch is not older than your current branch!'''&lt;br /&gt;
* If the most recent LTS branch is older than your current branch, you should choose the newest supported branch (green).&lt;br /&gt;
&lt;br /&gt;
Now, click on the link of the branch you want to download. This will redirect you to a page with information about this version. The first paragraph on this page contains a link to &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt;. Download this archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the right version using the Software Version Checker ===&lt;br /&gt;
The email you received will contain a link to the correct MediaWiki version. This link looks something like:&lt;br /&gt;
 https://releases.wikimedia.org/mediawiki/1.xx/mediawiki-core-1.xx.yy.tar.gz&lt;br /&gt;
&lt;br /&gt;
Simply click this link to download the archive and save it somewhere on your computer.&lt;br /&gt;
&lt;br /&gt;
== Renaming the old installation ==&lt;br /&gt;
An important step in the update process is to rename the old installation directory. This way, you can simply copy your data from the old installation directory to the new installation directory during the update. Additionally, you can easily restore your old wiki if something goes wrong.&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this, is to '''rename''' your wiki location (the directory containing your &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; configuration file) to a new directory. If you don't know how to access your files on your ULYSSIS account, refer to [[Accessing your files]] for easy instructions. For example, if &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; is stored in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, you should '''rename''' the wiki folder to &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Installing the new files ==&lt;br /&gt;
Now, you will need to upload the &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; file you downloaded in step 1 next to the old installation directory. For example, if your old installation directory is located in &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt;, upload &amp;lt;code&amp;gt;mediawiki-1.xx.yy.tar.gz&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;www/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After uploading, you can extract the archive file on the server by using the Cyberduck &amp;quot;Expand Archive&amp;quot; feature. Simply right click the archive and click &amp;quot;Expand Archive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck expand.png|thumb|center]]&lt;br /&gt;
 &lt;br /&gt;
This will create a directory named &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt;. Rename this directory to the original name of your wiki directory on your ULYSSIS account. For example, if the original name was &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;, rename this directory from &amp;lt;code&amp;gt;mediawiki-1.xx.yy&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;. This can be done using Cyberduck by right clicking the directory and clicking &amp;quot;Rename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck rename.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Finally, you need to move certain other other files and directories from the '''old''' directory to the '''new''' directory. The easiest way to do this using Cyberduck is by going up a directory (so if your wiki is in &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, go to &amp;lt;code&amp;gt;www&amp;lt;/code&amp;gt;), and drag-and-dropping the necessary files and directories. For example, moving &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; by drag-and-dropping it from &amp;lt;code&amp;gt;wiki_old&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;wiki&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 1.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck wiki move 2.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Although the exact files you need to move are different depending on your wiki, here are some suggestions from the [https://www.mediawiki.org/wiki/Manual:Upgrading#Other_files official instructions]:&lt;br /&gt;
* &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;, which contains your old configuration settings.&lt;br /&gt;
* The &amp;lt;code&amp;gt;images/&amp;lt;/code&amp;gt; directory, containing the uploaded files to the wiki. Because the new wiki directory already contains an (empty) &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory, you need to delete that one first by right-clicking on it and pressing &amp;quot;Delete&amp;quot;. Make sure to only delete the &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory in the '''new''' wiki directory. Then you can move the old &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; directory into the new wiki directory.&lt;br /&gt;
* Custom extensions from within the &amp;lt;code&amp;gt;extensions/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default extensions that are bundled with the new MediaWiki version.&lt;br /&gt;
* Custom skins from within the &amp;lt;code&amp;gt;skins/&amp;lt;/code&amp;gt; directory. Be careful not to overwrite the default skins that are bundled with the new MediaWiki version.&lt;br /&gt;
* Any &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file, if present. '''Make sure you can view hidden files'''; to enable this for Cyberduck, you can look at [[Accessing_your_files#Viewing_hidden_files|Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
== Updating extensions ==&lt;br /&gt;
If you use any extensions that are not bundled with MediaWiki by default, you should update them too. A list of bundled extensions can be found at https://www.mediawiki.org/wiki/Bundled_extensions_and_skins, these extensions will be updated automatically. However, for example, you might have the ULYSSIS extensions [[Securing MediaWiki using Centrale KU Leuven Login|MediaWikiShibboleth]] or [https://github.com/ULYSSIS-KUL/CompressUploads CompressUploads] installed. As with MediaWiki itself, you can find the versions of your installed extensions on the &amp;lt;code&amp;gt;Special:Version&amp;lt;/code&amp;gt; page, under &amp;quot;Installed extensions&amp;quot;. Extensions will often link to a website where you can download the latest versions. For example, for this wiki, you can find the installed extensions at [[Special:Version]]. At the time of writing, it looks like this: &lt;br /&gt;
&lt;br /&gt;
[[File:Installed extensions.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
Because the update instructions are different for each extension, you will have to refer to the update instructions of the extension you want to update. However, most extensions follow the same template as the MediaWiki upgrade itself:&lt;br /&gt;
* Downloading the latest version: make sure to download the correct update for your new MediaWiki version.&lt;br /&gt;
* Making a backup of the extension: you should already have a backup in the directory you created in step 2.&lt;br /&gt;
* Extracting the archive files: similar to the MediaWiki tar.gz archive files, you might have to copy the new extension files to a directory in the new &amp;lt;code&amp;gt;extension/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Finalizing the update ==&lt;br /&gt;
The final step in the update process is to update the database structure of your wiki. Your MediaWiki installation contains a script, called &amp;lt;code&amp;gt;update.php&amp;lt;/code&amp;gt;, to perform the necessary database upgrades. This script can be executed using the Cyberduck &amp;quot;Send Command&amp;quot; feature.&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck send command.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Enter the following command in the pop-up box (of course, replace &amp;lt;code&amp;gt;&amp;lt;wiki installation location&amp;gt;&amp;lt;/code&amp;gt; with the location of your new installation):&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;wiki installation location&amp;gt;/maintenance/update.php&lt;br /&gt;
&lt;br /&gt;
For example, if your wiki is located at &amp;lt;code&amp;gt;www/wiki&amp;lt;/code&amp;gt;, the command should be as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Send&amp;quot;, the command will be executed on the server. If everything went well, you should see a lot of output, ending with something like:&lt;br /&gt;
&lt;br /&gt;
[[File:Cyberduck update output.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
If you get the error &amp;lt;code&amp;gt;Could not open input file&amp;lt;/code&amp;gt;, you might have misspelled the installation location. Double check the path to make sure everything is correct.&lt;br /&gt;
&lt;br /&gt;
If you encounter any other errors while executing the script, you could try taking a look at the [https://www.mediawiki.org/wiki/Manual:Upgrading#Command_line_2 official instructions]. If this does not resolve your problems, feel free to send us an email. We will try to assist you in completing the update.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You successfully updated MediaWiki. Still, there are two more important steps you must perform:&lt;br /&gt;
* Test your new MediaWiki installation: make sure all basic functionality (viewing, editing pages, file upload) works and all your extensions function properly.&lt;br /&gt;
* Delete the old installation: you should remove the previously created &amp;lt;code&amp;gt;www/wiki_old&amp;lt;/code&amp;gt; directory, using the command line or through a GUI. A simple GUI explanation can be found on [[Accessing_your_files#Creating_and_Deleting_files_and_folders|Accessing your files]].&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Cyberduck_wiki_move_2.png&amp;diff=1536</id>
		<title>File:Cyberduck wiki move 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Cyberduck_wiki_move_2.png&amp;diff=1536"/>
		<updated>2021-08-31T23:11:02Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Second step in moving files/directories between wiki installations in Cyberduck&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Cyberduck_wiki_move_1.png&amp;diff=1535</id>
		<title>File:Cyberduck wiki move 1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Cyberduck_wiki_move_1.png&amp;diff=1535"/>
		<updated>2021-08-31T23:10:04Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First step in moving files/directories between wiki installations in Cyberduck&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1529</id>
		<title>Getting Apache logs</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1529"/>
		<updated>2021-08-15T20:38:13Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Using Cyberduck (graphical interface) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can find all your Apache logs (like &amp;lt;code&amp;gt;access.log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;error.log&amp;lt;/code&amp;gt;) on all of our shell servers in the directory &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt;. For more information on how to access your files, please visit [[Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
==Using Cyberduck (graphical interface)==&lt;br /&gt;
&lt;br /&gt;
You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per [[Accessing your files]], click on &amp;quot;Go&amp;quot; on the top bar and then click &amp;quot;Go to Folder...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 1.png]]&lt;br /&gt;
&lt;br /&gt;
Then enter &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt; as path name (replace ''username'' with your own username):&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 2.png]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Go&amp;quot;, you will see a directory for each of your websites, containing their Apache logs.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 3.png]]&lt;br /&gt;
&lt;br /&gt;
After a few days, logs will be compressed into a &amp;lt;code&amp;gt;bz2&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==Using the command line==&lt;br /&gt;
&lt;br /&gt;
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:&lt;br /&gt;
 username@ssh1:~$ cd /var/log/apache_user/username&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ ls&lt;br /&gt;
 username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls&lt;br /&gt;
 access-2014-05-07.log error-2014-05-07.log&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log &lt;br /&gt;
 [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico&lt;br /&gt;
&lt;br /&gt;
If you can't find your username inside of &amp;lt;code&amp;gt;/var/log/apache_user&amp;lt;/code&amp;gt;, don't worry. If you enter it with &amp;lt;code&amp;gt;cd username&amp;lt;/code&amp;gt;, it will automatically appear.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1528</id>
		<title>Getting Apache logs</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1528"/>
		<updated>2021-08-15T20:37:54Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can find all your Apache logs (like &amp;lt;code&amp;gt;access.log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;error.log&amp;lt;/code&amp;gt;) on all of our shell servers in the directory &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt;. For more information on how to access your files, please visit [[Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
==Using Cyberduck (graphical interface)==&lt;br /&gt;
&lt;br /&gt;
You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per [[Accessing your files]], click on &amp;quot;Go&amp;quot; on the top bar and then click &amp;quot;Go to Folder...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 1.png]]&lt;br /&gt;
&lt;br /&gt;
Then enter &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt; as path name (replace ''username'' with your own username):&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 2.png]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Go&amp;quot;, you will see a directory for each of your websites, containing their Apache logs.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 3.png]]&lt;br /&gt;
&lt;br /&gt;
After a few days, logs will be compressed into a `bz2` file.&lt;br /&gt;
&lt;br /&gt;
==Using the command line==&lt;br /&gt;
&lt;br /&gt;
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:&lt;br /&gt;
 username@ssh1:~$ cd /var/log/apache_user/username&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ ls&lt;br /&gt;
 username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls&lt;br /&gt;
 access-2014-05-07.log error-2014-05-07.log&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log &lt;br /&gt;
 [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico&lt;br /&gt;
&lt;br /&gt;
If you can't find your username inside of &amp;lt;code&amp;gt;/var/log/apache_user&amp;lt;/code&amp;gt;, don't worry. If you enter it with &amp;lt;code&amp;gt;cd username&amp;lt;/code&amp;gt;, it will automatically appear.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Reducing_disk_usage&amp;diff=1488</id>
		<title>Reducing disk usage</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Reducing_disk_usage&amp;diff=1488"/>
		<updated>2021-08-04T01:03:38Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
This page discusses what happens when you use more disk space than has been allotted to your account (your quota) and how to reduce your disk usage. You may have been pointed here through an automatic email notification you are running over your quota, or through our support. This page is also useful if you want to reduce your disk usage even if you're not using more than your quota. You can check your current disk usage as well as your quota on https://ucc.ulyssis.org/quota. &lt;br /&gt;
&lt;br /&gt;
This page first discusses what happens when you use more disk space than is available to your account type (so you therefore go over your quota). This is followed by a detailed manual on how to use the command line tool ''ncdu'' to look for the files and folders that may be causing trouble within your account. Finally, there's a list of examples of common causes for large disk space usage. &lt;br /&gt;
&lt;br /&gt;
== What happens when I go over my quota? ==&lt;br /&gt;
&lt;br /&gt;
If you are using more disk space than the allowed quota for your account type for more than seven consecutive days (the so-called grace period), you will no longer be able to write any additional files or extend existing files. You will probably no longer be able to edit websites on your account or it might even stop working outright. If you haven't configured a forwarder for your &amp;lt;code&amp;gt;''username''@ulyssis.org&amp;lt;/code&amp;gt; email address, you will lose emails sent to this address. The grace period of seven days is intended for you to have time to reduce your disk space. You will receive an email every day reminding you that you are using too much disk space. In order to prevent impact on other users in cases where disk usage within an account suddenly and substantially surges, an additional quota slightly higher than your normal quota is imposed, independent of any grace period.&lt;br /&gt;
&lt;br /&gt;
== Identifying which files &amp;amp; folders use the most disk space  ==&lt;br /&gt;
It is not always easy to immediately identify what is taking up space on your account. Sadly, there are no dependable cross-platform tools to help with this. Instead, we will be using the command line tool ''ncdu'', which runs directly on one of our shell servers. You do not need to be proficient with command line interfaces in order to use this tool, the step-by-step manual below will guide you through the process. However, should you get stuck, do not hesitate to contact us at &amp;lt;code&amp;gt;ulyssis@ulyssis.org&amp;lt;/code&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
* Connect through SSH to one of the shell servers: https://docs.ulyssis.org/Accessing_shell_servers_over_SSH&lt;br /&gt;
* Type in &amp;lt;code&amp;gt;ncdu&amp;lt;/code&amp;gt; and press enter. You will then see that &amp;lt;code&amp;gt;ncdu&amp;lt;/code&amp;gt; is scanning your account.&lt;br /&gt;
* Once &amp;lt;code&amp;gt;ncdu&amp;lt;/code&amp;gt; has finished scanning, it will display which files or folders located directly in your home directory are using the most disk space. When the filename stars with &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; it is a folder. The results are ordered by size, so it makes most sense to start with the top items.&lt;br /&gt;
* You can select different files/folders using the '''up and down arrow keys''', navigate the directory structure using either the '''enter and backspace''' keys or the '''left and right''' arrows to move in and out of folders, quit ncdu by pressing '''q''' and delete a file or folder with '''d'''. Be careful to not delete files you still need as you will need to contact us in order to restore them from a backup.&lt;br /&gt;
* You can check your progress on https://ucc.ulyssis.org/quota. The percentage and values displayed are always current and accurate, there is no delay.[[File:Disk usage ncdu.png|thumb|760x760px]]&lt;br /&gt;
&lt;br /&gt;
=== Common sources of unnecessary disk usage ===&lt;br /&gt;
&lt;br /&gt;
* Your ULYSSIS mailbox: Depending on your account settings, your ''@ulyssis.org'' email account may be used as a forwarder or an inbox. When set to ''Inbox'' on https://ucc.ulyssis.org/mail, email will be saved to the ''Maildir'' folder within your account. A substantial amount of email, especially with large attachments, may grow to quite a significant size. You can verify the contents of your mailbox easily by logging in on https://webmail.ulyssis.org using your ULYSSIS account credentials. You can then remove those emails that are no longer useful, and don't forget to empty the trash. To remove the entire mailbox, you can simply remove the Maildir folder from your account (using ncdu, Cyberduck, or another tool). To empty the trash manually, you can remove the ''Maildir/.Trash'' folder. If you no longer wish to use you mailbox, don't forget to change the configuration on https://ucc.ulyssis.org/mail to forward your messages, since you may receive relevant information about your account through this address.&lt;br /&gt;
* Old websites: if you have older websites on your account that you are no longer using, it might be worth removing them in their entirety. If the deleted website uses a database (this will always be the case if your using WordPress, MediaWiki or another popular CMS), then you should also delete those through our control panel: https://ucc.ulyssis.org (either the MySQL or PostgreSQL sections). If this website had an associated (sub)domain, please send us an email to have it removed. Also keep in mind that old websites may pose a security risk, so it's never good to leave them lying about.&lt;br /&gt;
* Unused images: in the case of many CMSes (WordPress, Drupal, ...), removing an image from a post will not delete it. For example, in the case of WordPress it will still be available through the Media Library. You can easily find these [https://wordpress.com/support/media/2/#unattached-files unattached files]. In order to reclaim the disk space used by the image, you will have to [https://wordpress.com/support/trash/#permanently-deleting-an-upload delete] it there as well. Similarly, MediaWiki offers a list of ''unused files'' as a special page available in the list of ''Special Pages''. Keep in mind that WordPress or MediaWiki might not always be aware an image or other file is used when it has not been added through its interfaces or through a third party plugin.&lt;br /&gt;
* Large images: images and especially pictures are often several MBs in size and often have a large resolution. While this is great for editing and printing, such large sizes are not all that useful for inclusion in a webpage. They can make your site load slower and use more disk space without a significant increase in quality. You should therefore consider resizing images before uploading them or installing a plugin, module or extension that reduces their size on upload. However, make sure to watch out for plugins that keep the original image around as this will not reduce but increase your disk usage. For a tutorial on how to resize images, you can take a look at https://wordpress.com/support/media/image-optimization/. This tutorial is geared towards WordPress, but is also applicable in general. If you are using MediaWiki, we have written a plugin that reduces the size of various types of files. You can find more details on [[Setting up MediaWiki#Extensions|Setting up MediaWiki - Extensions]].&lt;br /&gt;
* Backups: ULYSSIS makes daily backups of all account data, including databases, and keeps them for at least a month. It is therefore not necessary to make automated backups of your own, for example with plugins such as [https://nl.wordpress.org/plugins/updraftplus/ Updraft] for WordPress. Although it is a good practice to make backups whenever you are making large changes to your site, it is not necessary to keep them after you have verified that your site works correctly.&lt;br /&gt;
* Anything missing on this list? Feel free to contact us on &amp;lt;code&amp;gt;ulyssis@ulyssis.org&amp;lt;/code&amp;gt; with your suggestions.&lt;br /&gt;
[[Category:Files]]&lt;br /&gt;
[[Category:Account]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1487</id>
		<title>Getting Apache logs</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1487"/>
		<updated>2021-08-04T00:54:16Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can find all your Apache logs (like access.log and error.log) on all of our shell servers in the directory &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt;. For more information on how to access your files, please visit [[Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
==Using Cyberduck==&lt;br /&gt;
&lt;br /&gt;
You can access the log files using an SFTP client like Cyberduck. After logging in to one of our shell servers as per [[Accessing your files]], click on &amp;quot;Go&amp;quot; on the top bar and then click &amp;quot;Go to Folder...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 1.png]]&lt;br /&gt;
&lt;br /&gt;
Then enter &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt; as path name (replace ''username'' with your own username):&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 2.png]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Go&amp;quot;, you will see a directory for each of your websites, containing their Apache logs.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 3.png]]&lt;br /&gt;
&lt;br /&gt;
==Using the command line==&lt;br /&gt;
&lt;br /&gt;
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:&lt;br /&gt;
 username@ssh1:~$ cd /var/log/apache_user/username&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ ls&lt;br /&gt;
 username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls&lt;br /&gt;
 access-2014-05-07.log error-2014-05-07.log&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log &lt;br /&gt;
 [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico&lt;br /&gt;
&lt;br /&gt;
If you can't find your username inside of &amp;lt;code&amp;gt;/var/log/apache_user&amp;lt;/code&amp;gt;, don't worry. If you enter it with &amp;lt;code&amp;gt;cd username&amp;lt;/code&amp;gt;, it will automatically appear.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1486</id>
		<title>Getting Apache logs</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_Apache_logs&amp;diff=1486"/>
		<updated>2021-08-04T00:52:03Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: Filezilla -&amp;gt; Cyberduck, gooi volgorde om&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can find all your Apache logs (like access.log and error.log) on all of our shell servers in the directory &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt;. For more general information on how to access your files, please visit [[Accessing your files]].&lt;br /&gt;
&lt;br /&gt;
==Using Cyberduck==&lt;br /&gt;
&lt;br /&gt;
You can access the log files using an SFTP client like Cyberduck. Click on &amp;quot;Go&amp;quot; on the top bar and then click &amp;quot;Go to Folder...&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 1.png]]&lt;br /&gt;
&lt;br /&gt;
Then enter &amp;lt;code&amp;gt;/var/log/apache_user/''username''&amp;lt;/code&amp;gt; as path name (replace ''username'' with your own username):&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 2.png]]&lt;br /&gt;
&lt;br /&gt;
After pressing &amp;quot;Go&amp;quot;, you will see a directory for each of your websites, containing their Apache logs.&lt;br /&gt;
&lt;br /&gt;
[[File:Getting Apache Logs - Cyberduck 3.png]]&lt;br /&gt;
&lt;br /&gt;
==Using the command line==&lt;br /&gt;
&lt;br /&gt;
You can also access your logs by [[Accessing shell servers over SSH|logging in to one of our shell servers over SSH]] and navigating to the correct directory:&lt;br /&gt;
 username@ssh1:~$ cd /var/log/apache_user/username&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ ls&lt;br /&gt;
 username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username$ cd username.ulyssis.be&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ ls&lt;br /&gt;
 access-2014-05-07.log error-2014-05-07.log&lt;br /&gt;
 &lt;br /&gt;
 username@ssh1:/var/log/apache_user/username/username.ulyssis.be$ tail error-2014-05-07.log &lt;br /&gt;
 [Wed May 07 01:27:14 2014] [error] [client 10.0.0.1] File does not exist: /home/user/username/www/favicon.ico&lt;br /&gt;
&lt;br /&gt;
If you can't find your username inside of &amp;lt;code&amp;gt;/var/log/apache_user&amp;lt;/code&amp;gt;, don't worry. If you enter it with &amp;lt;code&amp;gt;cd username&amp;lt;/code&amp;gt;, it will automatically appear.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_2.png&amp;diff=1485</id>
		<title>File:Getting Apache Logs - Cyberduck 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_2.png&amp;diff=1485"/>
		<updated>2021-08-04T00:48:46Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: Thomasd uploaded a new version of File:Getting Apache Logs - Cyberduck 2.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Second Cyberduck screenshot for Getting Apache Logs&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_3.png&amp;diff=1484</id>
		<title>File:Getting Apache Logs - Cyberduck 3.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_3.png&amp;diff=1484"/>
		<updated>2021-08-04T00:41:02Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Third Cyberduck screenshot for Getting Apache Logs&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_2.png&amp;diff=1483</id>
		<title>File:Getting Apache Logs - Cyberduck 2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_2.png&amp;diff=1483"/>
		<updated>2021-08-04T00:39:18Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Second Cyberduck screenshot for Getting Apache Logs&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_1.png&amp;diff=1482</id>
		<title>File:Getting Apache Logs - Cyberduck 1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Getting_Apache_Logs_-_Cyberduck_1.png&amp;diff=1482"/>
		<updated>2021-08-04T00:36:22Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First Cyberduck screenshot for Getting Apache Logs&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Setting_up_MediaWiki&amp;diff=1179</id>
		<title>Setting up MediaWiki</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Setting_up_MediaWiki&amp;diff=1179"/>
		<updated>2020-11-09T01:41:48Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: /* Setup your wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will go through a basic setup of MediaWiki. It is based on [http://www.mediawiki.org/wiki/Manual:Installing_MediaWiki the official MediaWiki installation wikipage], and it gives a few specifics for setting it up on a hosted account over at ULYSSIS.&lt;br /&gt;
&lt;br /&gt;
This tutorial we'll use a ULYSSIS-account with username &amp;quot;me&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Putting setup-files in place ==&lt;br /&gt;
&lt;br /&gt;
First we'll have to download the setup file which you can find over at [http://www.mediawiki.org/wiki/Download the official MediaWiki website].&lt;br /&gt;
&lt;br /&gt;
It's an archived file, so you need to extract it first and put the files in a subdirectory of your &amp;quot;document root&amp;quot;.&lt;br /&gt;
The default is just a www directory in your home folder.&lt;br /&gt;
&lt;br /&gt;
Putting your files in document_root/wiki/ will make your wiki be located at usersname.ulyssis.be/wiki/.&lt;br /&gt;
&lt;br /&gt;
If you prefer, you can do this all graphically using the manual [[Accessing_your_files]].&lt;br /&gt;
&lt;br /&gt;
If you prefer the command line;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
homeuser@home:~$ ssh me@ssh1.ulyssis.org&lt;br /&gt;
enter super secret password:&lt;br /&gt;
me@zap:~$ wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.6.tar.gz&lt;br /&gt;
me@zap:~$ tar xvxf mediawiki-1.23.6.tar.gz&lt;br /&gt;
me@zap:~$ mv mediawiki-1.23.6 www/wiki&lt;br /&gt;
me@zap:~$ rm -r mediawiki-1.23.6.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up database==&lt;br /&gt;
&lt;br /&gt;
Like the [http://www.mediawiki.org/wiki/Manual:Installing_MediaWiki the official MediaWiki installation wiki] tells us, we have three different options to choose from; PostgreSQL, MySQL and SQLite.&lt;br /&gt;
&lt;br /&gt;
It's easy to set a PostgreSQL or MySQL database; just go to the UCC. For this tutorial we will continue with a MySQL database (PostgreSQL installation steps are quite similar).&lt;br /&gt;
&lt;br /&gt;
Let us visit https://ucc.ulyssis.org/mysql; if this is your first time using MySQL you'll need to create a new account by putting in a super secret password.&lt;br /&gt;
The wizard will create your MySQL account with the same name as your user-account.&lt;br /&gt;
We'll also create a new database with an appropriate name by clicking on 'Add database'. In this tutorial we will choose; &amp;quot;wiki&amp;quot;, notice that it will be prepended with our username, so we'll end up with a new database named &amp;quot;me_wiki&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Setup your wiki==&lt;br /&gt;
&lt;br /&gt;
If all went well, you can access your website at http://username.ulyssis.be/the_folder_you_used and start the setup wizard.&lt;br /&gt;
In our example, will surf to http://me.ulyssis.be/wiki.&lt;br /&gt;
&lt;br /&gt;
The wizard will guide you through some configuration options. Most of them our pretty straight-forward.&lt;br /&gt;
When in doubt, you can always click the question mark wich will show you some sensible and recommended default...&lt;br /&gt;
We'll just discuss the page were the wizard asks you for the database.&lt;br /&gt;
In our example;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database host: mysql.ulyssis.org&lt;br /&gt;
Database name: me_wiki&lt;br /&gt;
// The name of our database; i.e. the name we chose, prepended by our username.&lt;br /&gt;
Database table prefix:&lt;br /&gt;
// We can leave this blank.&lt;br /&gt;
Database user: me&lt;br /&gt;
// This is the name of our MySQL-user, which was named after our ULYSSIS-username.&lt;br /&gt;
Database password: supersecretpassword&lt;br /&gt;
// Please note that this is not your ULYSSIS-password, but the password you used in UCC when creating the MySQL user!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating the wiki==&lt;br /&gt;
&lt;br /&gt;
After the setup wizard is complete, you can begin the installation procedure.&lt;br /&gt;
If all went well, you'll be greeted by a page which congratulates you with your new installation.&lt;br /&gt;
&lt;br /&gt;
==Finishing up installation==&lt;br /&gt;
&lt;br /&gt;
The setup will offer you a configuration file (containing some settings you specified) that you need to download to your server (more specifically in directory where your MediaWiki-files reside in).&lt;br /&gt;
&lt;br /&gt;
You again can do this graphically, or if you prefer a terminal;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
homeuser@home:~$ scp path_to_file/LocalSettings.php me@ssh1.ulyssis.org:~/www/wiki&lt;br /&gt;
enter super secret password:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this is done, you can finally start using your wiki.&lt;br /&gt;
&lt;br /&gt;
Please refer to [http://www.mediawiki.org/wiki/MediaWiki the original MediaWiki documentation] for a more detailed or advanced information.&lt;br /&gt;
&lt;br /&gt;
== Extending MediaWiki ==&lt;br /&gt;
&lt;br /&gt;
By default, every MediaWiki installation looks and works identical. While that is convenient for users, it can be less than ideal if you need specific functionality or wish to adapt your wiki to your style.&lt;br /&gt;
&lt;br /&gt;
=== Extensions ===&lt;br /&gt;
&lt;br /&gt;
Extensions add functionality to a wiki, such as more fine-grained authentication, extra layout elements for articles or text filters. An overview of what kinds of extensions are possible can be found on [https://www.mediawiki.org/wiki/Manual:Extensions the official manual].&lt;br /&gt;
&lt;br /&gt;
Some noteworthy extensions can be used to prevent spam or unauthorised access. You can find more information on [[Preventing spam on MediaWiki]] and [[Securing MediaWiki using Centrale KU Leuven Login]].&lt;br /&gt;
&lt;br /&gt;
We've also found that users sometimes have problems with high amounts of disk space usage. To help those users out, we've developed a MediaWiki extension that can automatically reduce file size of new uploads. Specifically it's possible to compress PDFs, convert inefficient image formats such as BMP and TIFF to PNG, loslessly compress PNG, lossy compress JPG, resize images and strip EXIF data. You can find more details on https://github.com/ULYSSIS-KUL/CompressUploads&lt;br /&gt;
&lt;br /&gt;
=== Skins ===&lt;br /&gt;
&lt;br /&gt;
Skins are similar to themes, templates or styles within other software. By default MediaWiki uses the well known Vector skin. But other skins are available. Sadly, MediaWiki doesn't maintain a complete list of all available skins and whether they work with recent releases, so it may take a bit of perseverance. General information on Skins is available on the [https://www.mediawiki.org/wiki/Manual:Skins Official Manual]. Besides that there's the [https://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles the user style gallery] and [https://www.mediawiki.org/wiki/Category:All_skins the list of skins].&lt;br /&gt;
&lt;br /&gt;
[[Category:CMSs]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1018</id>
		<title>Using (Fast)CGI for non-PHP websites</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=1018"/>
		<updated>2019-11-15T18:37:22Z</updated>

		<summary type="html">&lt;p&gt;Thomasd: verwijder verkeerde &amp;quot;you&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You're not stuck with PHP if you want to make a dynamic website. You can use all sorts of frameworks and programming languages with ULYSSIS, as long as it has CGI or FastCGI support.&lt;br /&gt;
&lt;br /&gt;
If you want to use a certain programming language or framework, and you can't get it to work, don't hesitate to contact us at [mailto:ulyssis@ulyssis.org ulyssis@ulyssis.org]. We will of course not write any code for you, but we can give you some pointers or directions.&lt;br /&gt;
&lt;br /&gt;
==CGI==&lt;br /&gt;
&lt;br /&gt;
CGI is a simple way to create a dynamic website. We use Apache's [http://httpd.apache.org/docs/2.4/mod/mod_cgid.html mod_cgid] to provide support for CGI. Note, however, that CGI is inefficient and&lt;br /&gt;
in general we recommend you to use a framework together with FastCGI. There are many frameworks, ranging from very simple and lightweight, to more complex and feature rich.&lt;br /&gt;
&lt;br /&gt;
If, for example, you want Apache to interpret all files with the extension &amp;lt;tt&amp;gt;.cgi&amp;lt;/tt&amp;gt; as CGI scripts, use the following &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file (to be placed in your &amp;lt;tt&amp;gt;www&amp;lt;/tt&amp;gt; folder):&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler cgi-script .cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example of a very simple Python CGI script (called &amp;lt;tt&amp;gt;hello.cgi&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
print 'Content-Type: text/plain\n'&lt;br /&gt;
print 'Hello world!'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CGI scripts need to be executable, otherwise they won't work:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x hello.cgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FastCGI==&lt;br /&gt;
&lt;br /&gt;
We use Apache's [http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html mod_fcgid] to provide support for FastCGI.&lt;br /&gt;
&lt;br /&gt;
In order to use FastCGI, you will generally need a starter script specific to your framework and application. Just do a web search for &amp;quot;''framework'' mod_fcgid&amp;quot;, where ''framework'' is the framework you're using, and you will find good instructions. There's a Django example below.&lt;br /&gt;
&lt;br /&gt;
You'll want to treat this starter script as a &amp;lt;tt&amp;gt;mod_fcgid&amp;lt;/tt&amp;gt; script, and usually, you'll want to redirect everything to this script, so you can use an &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file that looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replace ''starter.fcgi'' with the name of your starter script. Don't forget to make your starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
The starter script must be located in the same folder as the &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
{{warning|Warning!|Do not place sensitive files inside the web accessible folder. Make sure they are located in a folder outside the document root, or they will be downloadable through the webserver.}}&lt;br /&gt;
It is adviced to only place the fcgi starter script, &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; and static files (images, stylesheets) inside the document root.&lt;br /&gt;
&lt;br /&gt;
=== Startup time and persistency === &lt;br /&gt;
&lt;br /&gt;
It is important to keep in mind that our Apache webworkers will only run your start script when a request is made. As soon as that first request has been received, it will try and keep a few instances of your application around for future use. This of course affects how you restart your application after changes (see below), but also means that applications with a longer start up time (for example a language such as Python combined with a larger framework) will experience an initial slow request. This slow startup is obviously not a factor for faster languages such as Haskell, C++ or Go.&lt;br /&gt;
&lt;br /&gt;
Sadly, Apache is unable to have FastCGI processes persist beyond a reload or restart. This means in practice that every night around 6h25 when the logs are rotated, which requires Apache to be reloaded, all running fcgi processes will be gracefully terminated. The same thing happens when we make changes to the Apache configuration when a new website or user is added. &lt;br /&gt;
&lt;br /&gt;
For those who have a very high startup time and don't generate enough traffic to not experience issues with this behaviour, it's possible to use a [[Managing_Cron_jobs | cronjob]] to visit the website every night at 6h30 or 7h, or even hourly.&lt;br /&gt;
&lt;br /&gt;
===Restarting your application===&lt;br /&gt;
&lt;br /&gt;
If you've changed your application, you will need to restart it for these changes to take effect. However, because you're editing the application on a different server than were it is running, you do not have access to the running process. You'll have to create some sort of mechanism to restart the process.&lt;br /&gt;
&lt;br /&gt;
In the Django example below, the starter script has been written so that when it is changed, the application is automatically restarted within 1 second. The same mechanism can be applied to other Python sites. You can change the modification date without actually changing the contents of the starter script by using &amp;lt;tt&amp;gt;touch&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;touch starter.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace ''starter.fcgi'' with the name of your starter script.&lt;br /&gt;
&lt;br /&gt;
===Example: Django===&lt;br /&gt;
&lt;br /&gt;
If you want to make a website using [https://www.djangoproject.com/ Django], we recommend that you use a [http://virtualenv.readthedocs.org/ virtualenv]. This tool is already preinstalled on our shell servers.&lt;br /&gt;
&lt;br /&gt;
You can use the following steps to get up and running with Django at ULYSSIS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Accessing shell servers over SSH|Log in to a shell server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a new virtualenv, you can create one in &amp;lt;tt&amp;gt;~/.venv&amp;lt;/tt&amp;gt;, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtualenv ~/.venv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or, for Python 3:&lt;br /&gt;
&amp;lt;pre&amp;gt;virtualenv ~/.venv --python=python3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Activate this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;. ~/.venv/bin/activate&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Install Django inside of this virtualenv:&lt;br /&gt;
&amp;lt;pre&amp;gt;pip install django&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create a new Django project:&lt;br /&gt;
&amp;lt;pre&amp;gt;django-admin.py startproject mysite&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace ''mysite'' with your project's desired name.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Install flup for FastCGI:&lt;br /&gt;
&amp;lt;pre&amp;gt;pip install flup6&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Put an &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file in your site's directory, e.g. the &amp;lt;tt&amp;gt;www&amp;lt;/tt&amp;gt; folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;Options +ExecCGI&lt;br /&gt;
AddHandler fcgid-script .fcgi&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Create the starter script (replace ''user'' with org if you are an organization, and ''username'' with your ULYSSIS username):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;#!/home/user/username/.venv/bin/python&lt;br /&gt;
&lt;br /&gt;
import sys, os, os.path&lt;br /&gt;
from threading import Thread&lt;br /&gt;
&lt;br /&gt;
this_file = os.path.realpath(__file__)&lt;br /&gt;
&lt;br /&gt;
site_dir = '/home/user/username/mysite'&lt;br /&gt;
sys.path.insert(0, site_dir)&lt;br /&gt;
os.chdir(site_dir)&lt;br /&gt;
&lt;br /&gt;
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'&lt;br /&gt;
&lt;br /&gt;
def stat_thread():&lt;br /&gt;
    import time, os, signal&lt;br /&gt;
    start_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
    while True:&lt;br /&gt;
        cur_mtime = os.stat(this_file).st_mtime&lt;br /&gt;
        if cur_mtime != start_mtime:&lt;br /&gt;
            os.kill(os.getpid(), signal.SIGTERM)&lt;br /&gt;
        time.sleep(1)&lt;br /&gt;
&lt;br /&gt;
Thread(target=stat_thread).start()&lt;br /&gt;
&lt;br /&gt;
from django.core.servers.basehttp import get_internal_wsgi_application&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
WSGIServer(get_internal_wsgi_application(), debug=False).run()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call this script &amp;lt;tt&amp;gt;mysite.fcgi&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Make the starter script executable:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod +x mysite.fcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Go to ''username''.ulyssis.be (or whatever URL you chose to use), and it should show you the default &amp;quot;Welcome to Django&amp;quot; page.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide was based on, and you can find more information in the official Django documentation:&lt;br /&gt;
* [https://docs.djangoproject.com/en/stable/intro/tutorial01/ The Django tutorial]&lt;br /&gt;
* [https://flask.palletsprojects.com/en/1.1.x/deploying/fastcgi/ Flask documentation for FastCGI]&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Thomasd</name></author>
	</entry>
</feed>