<?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=Lars</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=Lars"/>
	<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/Special:Contributions/Lars"/>
	<updated>2026-05-14T03:09:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=1050</id>
		<title>Getting SSL/TLS</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=1050"/>
		<updated>2020-01-06T17:04:23Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ULYSSIS does not sell or offer any other SSL certificates than our self-signed certificate. We will however guide requests and install a certificate from the KU Leuven is you are eligible for one, and we will also install certificates you have bought elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Requesting SSL from the KU Leuven==&lt;br /&gt;
The KU Leuven partners with other universities to use free SSL for its services, organisations and employees. We have permission to request SSL for Student Unions recognized by LOKO or another official body. Organisations (Vrije Verenigingen) are required to be recognized by LOKO or another official body and need to supply a reasoning why they need SSL. Individual users can request SSL but ICTS will only grant permission with elaborate reasoning.&lt;br /&gt;
&lt;br /&gt;
Before sending us a request the following steps have to be done:&lt;br /&gt;
*Setup the site that needs SSL&lt;br /&gt;
*Change the domain's organisation-attribute to ''KU Leuven'' or ''Katholieke Universiteit Leuven''&lt;br /&gt;
*Create a forwarder from hostmaster@yourdomain.tld to ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
Then you can send an email to ulyssis@ulyssis.org containing your name, the name of the organisation, what you will use SSL for and the domain and if needed a list of subdomains.&lt;br /&gt;
&lt;br /&gt;
We will then generate the required cryptographic key and request and submit them with ICTS. It usually takes a few days before they have had time to verify both the domain and then the request for SSL itself. As soon as ICTS approves the request we will install the certificate and notify you.&lt;br /&gt;
&lt;br /&gt;
==External certificates==&lt;br /&gt;
To install external certificates we require the certificate itself, the private key, and possibly the chain. We prefer you also send us (a link to) the documentation of your supplier. As certificate files, especially private keys, are a delicate matter we suggest you just email us the path in your homedirectory you've put them and we will move them over to the webserver safely. For more information concerning this procedure you can always contact us on ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
===Let's Encrypt===&lt;br /&gt;
==== Certificate file structure ====&lt;br /&gt;
&lt;br /&gt;
We currently do not have an automated system for renewing and deploying certificates such as those supplied by Let's Encrypt. We are however looking into automating this process in the future. Since more of our users are starting to use Let's Encrypt, and all of their certificates need to be renewed frequently, we have a specific procedure now.&lt;br /&gt;
&lt;br /&gt;
When wishing to add a certificate with Let's Encrypt to your website, or renew your existing one, first create a folder &amp;lt;code&amp;gt;letsencrypt&amp;lt;/code&amp;gt; in your '''home directory'''. Then add a folder per domain or group of domains:&lt;br /&gt;
 mkdir letsencrypt&lt;br /&gt;
 mkdir letsencrypt/mydomain.be&lt;br /&gt;
&lt;br /&gt;
Certificates should be stored in these folders, according to the following file structure:&lt;br /&gt;
 letsencrypt/&lt;br /&gt;
 └── mydomain.be/&lt;br /&gt;
     ├── mydomain.be.chain&lt;br /&gt;
     ├── mydomain.be.crt&lt;br /&gt;
     └── mydomain.be.key&lt;br /&gt;
&lt;br /&gt;
If you already possess the necessary files, renaming and copying them accordingly is sufficient. Otherwise, you can generate or renew your certificates using '''acme.sh''':&lt;br /&gt;
&lt;br /&gt;
==== Using acme.sh ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #f2dede; color: #a94442; border: 1px solid #a94442; border-radius: 5px; padding: 5px&amp;quot;&amp;gt;'''Warning:''' If you use a &amp;lt;code&amp;gt;.htaccess&amp;lt;/code&amp;gt; file in the '''webroot of the domain name''', make sure to add the following lines at '''the top of the file''':&lt;br /&gt;
 &amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;
   RewriteRule &amp;quot;^.well-known/acme-challenge&amp;quot; - [L]&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Generating the certificates =====&lt;br /&gt;
&lt;br /&gt;
Because the normal method of generating Let's Encrypt certificates, certbot, requires root access, it's impossible for normal users to do so on our servers. Luckily there are plenty of alternatives which implement the Let's Encrypt protocol.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we'll be using the '''acme.sh''' program to generate our certificates on the ULYSSIS servers.&lt;br /&gt;
&lt;br /&gt;
First of all, we download the &amp;lt;code&amp;gt;acme.sh&amp;lt;/code&amp;gt; script and make it executable:&lt;br /&gt;
 wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh&lt;br /&gt;
 chmod +x acme.sh&lt;br /&gt;
&lt;br /&gt;
Next we actually generate the certificates. Make sure to replace the necessary parts (email, webroot, domain name):&lt;br /&gt;
 ./acme.sh --issue --cert-file letsencrypt/mydomain.be/mydomain.be.crt --key-file letsencrypt/mydomain.be/mydomain.be.key --ca-file letsencrypt/mydomain.be/mydomain.be.chain --accountemail &amp;quot;email@example.com&amp;quot; -w /home/user/myusername/path/to/webroot -d mydomain.be -d www.mydomain.be&lt;br /&gt;
&lt;br /&gt;
If we provide an email address, for example &amp;quot;email@example.com&amp;quot;, Let's Encrypt will remind us to renew our certificates when necessary. &amp;lt;code&amp;gt;/home/user/myusername/path/to/webroot&amp;lt;/code&amp;gt; is the path to the '''webroot of the domain name'''. Note that we are issuing certificates for &amp;quot;mydomain.be&amp;quot; here. We also want to add the subdomain &amp;quot;www.mydomain.be&amp;quot; to the certificate, so we also pass it to the script. You can add additional subdomains if needed.&lt;br /&gt;
&lt;br /&gt;
===== Renewing the certificates =====&lt;br /&gt;
&lt;br /&gt;
To renew our certificates, we just execute:&lt;br /&gt;
 ./acme.sh --renew --cert-file letsencrypt/mydomain.be/mydomain.be.crt --key-file letsencrypt/mydomain.be/mydomain.be.key --ca-file letsencrypt/mydomain.be/mydomain.be.chain -d mydomain.be&lt;br /&gt;
&lt;br /&gt;
After renewing certificates, you have to email us to install your renewed certificate.&lt;br /&gt;
&lt;br /&gt;
==== Installing the certificates ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can check whether everything is stored correctly by executing:&lt;br /&gt;
 ulyssis-certificate check mydomain.be&lt;br /&gt;
&lt;br /&gt;
If everything looks good, you should only see lines starting with &amp;lt;code&amp;gt;[ OK ]&amp;lt;/code&amp;gt;. Any line starting with &amp;lt;code&amp;gt;[FAIL]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[ABRT]&amp;lt;/code&amp;gt; means a check has failed, you must correct this error before asking us to install your certificate. &lt;br /&gt;
&lt;br /&gt;
Once you have placed your files in the correct folder, you can send us an email clearly stating for which domains we need to add certificates and where the files are stored. If you are renewing existing certificates, also clearly state that in your email.&lt;br /&gt;
&lt;br /&gt;
We have largely automated the installation of certificates. If you do not follow these instructions, your request will be denied or you may end up with broken SSL. So make sure you follow this procedure carefully.&lt;br /&gt;
&lt;br /&gt;
==Logs==&lt;br /&gt;
Due to the nature of our setup (dumb loadbalancer combined with shibboleth on webworkers), all https traffic will seem to come from our loadbalancer IP address instead of the actual originating IP address. Keep this in mind when checking log files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Webserver]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Registering_a_new_account&amp;diff=685</id>
		<title>Registering a new account</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Registering_a_new_account&amp;diff=685"/>
		<updated>2019-02-09T16:21:39Z</updated>

		<summary type="html">&lt;p&gt;Lars: Add image with highlighted KU Leuven login link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To register an account you can follow these easy steps:&lt;br /&gt;
&lt;br /&gt;
[[File:UCC Request New Account.png|thumb|right]]&lt;br /&gt;
* Go to https://ucc.ulyssis.org/accounts and login using your Central KU Leuven Account&lt;br /&gt;
* Select the kind of account you wish to register&lt;br /&gt;
** Most people will want to register a '''regular account''' for '''personal use'''&lt;br /&gt;
** If you are a recognised '''faculty''' union, assembly or representational organisation you are entitled to this free account. We verify this using the list of '''recognised &amp;quot;kringen&amp;quot;''' of LOKO, http://loko.be/verenigingen/ . Recognised organisations are not entitled to a free account.&lt;br /&gt;
** If you are a '''Recognised organisation''' by LOKO, Studentenraad KU Leuven or the KU Leuven itself you are entitled to an organisation account, this account has a reduced price.&lt;br /&gt;
* After picking your account type you have to chose what options you want, and choose a username and language.&lt;br /&gt;
* Next you need to accept the ULYSSIS terms of use and confirm your order.&lt;br /&gt;
* An email will be sent to your KU Leuven emailaddress to confirm your order and with a request for payment. &lt;br /&gt;
* As soon as we have received and processed your payment your account will be activated and you will receive instructions to set a password.&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:UCC_Request_New_Account.png&amp;diff=684</id>
		<title>File:UCC Request New Account.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:UCC_Request_New_Account.png&amp;diff=684"/>
		<updated>2019-02-09T16:19:25Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Resetting_your_password&amp;diff=671</id>
		<title>Resetting your password</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Resetting_your_password&amp;diff=671"/>
		<updated>2018-12-21T19:24:42Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can always reset your password.&lt;br /&gt;
In order to reset your password, visit [https://ucc.ulyssis.org/ucc/passwd/reset UCC]. Please keep in mind you need to be logged out of UCC to be able to reset your password. &lt;br /&gt;
&lt;br /&gt;
* Fill in your username and click on 'reset password'&lt;br /&gt;
* Then you will have to sign in using your KU Leuven credentials to make sure it is really you&lt;br /&gt;
* Choose another password&lt;br /&gt;
* Click on reset password&lt;br /&gt;
* You will immediately be logged out of your KU Leuven account again, but your password will have been changed.&lt;br /&gt;
* Try to log in at UCC with your new password&lt;br /&gt;
&lt;br /&gt;
Be wise and pick a [https://xkcd.com/936/ strong and easy to remember password].&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Forwarders&amp;diff=636</id>
		<title>Forwarders</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Forwarders&amp;diff=636"/>
		<updated>2018-08-30T14:25:30Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* Change the forwarders for your @ulyssis email address */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You may want to receive e-mail from ulyssis on another email provider. It is very easy to set this up.&lt;br /&gt;
&lt;br /&gt;
== Change the forwarders for your @ulyssis.org email address ==&lt;br /&gt;
&lt;br /&gt;
# Go to ucc.ulyssis.org and log in with your username and password.&lt;br /&gt;
# On the right side, click on '''Mail'''.&lt;br /&gt;
# Under '''Address forward''' you can change the forward address of your ULYSSIS mail by clicking on '''edit'''.&lt;br /&gt;
# Choose '''forward''' and enter the email address you want to forward your ULYSSIS mail to and save the changes.&lt;br /&gt;
# If you forward to Gmail, Hotmail. or use Thunderbird, we recommend looking at [[Using a forwarder as an alias]] so you can send mails under the forwarding address instead of just your own.&lt;br /&gt;
&lt;br /&gt;
== Change the forwarders for other domains ==&lt;br /&gt;
&lt;br /&gt;
# Go to ucc.ulyssis.org and log in with your username and password.&lt;br /&gt;
# On the right side, click on '''Mail'''.&lt;br /&gt;
  [[File:Forwarder Step1.png|700px]]&lt;br /&gt;
# Under '''Virtual Domains''', click on the domain you want to change.&lt;br /&gt;
  [[File:Forwarder Step2.png|700px]]&lt;br /&gt;
# You can change a forwarder by clicking on '''edit''' or on '''Add alias''' and add the forwarders you want.&lt;br /&gt;
  [[File:Forwarder Step3.png|700px]]&lt;br /&gt;
# Save your changes&lt;br /&gt;
&lt;br /&gt;
== Use your mailbox and forwarders at the same time ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to set the forwarders, that will also allow you to use your mailbox and the webinterface, is to use a .forward file. On each line of this file, you can specify to wich addresses you want to forward the email. If one of the addresses is the same as your @ulyssis address, then the mail will also be placed in your ULYSSIS mailbox. In the following example, your @ulyssis email address is &amp;lt;code&amp;gt;user@ulyssis.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example .forward file:&lt;br /&gt;
&lt;br /&gt;
 user@ulyssis.org&lt;br /&gt;
 example@gmail.com&lt;br /&gt;
 example2@skynet.be&lt;br /&gt;
&lt;br /&gt;
This will place the email in your ULYSSIS mailbox so that you can access it from the webinterface or your local mailclient. It will also forward the mail to &amp;lt;code&amp;gt;example@gmail.com&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;example2@skynet.be&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To use this, place a .forward file with the prefered email addresses in your homedir, see [[Accessing your files]], and set your forwarder to 'Inbox' in https://ucc.ulyssis.org/mail&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Forwarders&amp;diff=632</id>
		<title>Forwarders</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Forwarders&amp;diff=632"/>
		<updated>2018-08-04T17:17:29Z</updated>

		<summary type="html">&lt;p&gt;Lars: Add images for forwarder setup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You may want to receive e-mail from ulyssis on another email provider. It is very easy to set this up.&lt;br /&gt;
&lt;br /&gt;
== Change the forwarders for your @ulyssis email address ==&lt;br /&gt;
&lt;br /&gt;
# Go to ucc.ulyssis.org and log in with your username and password.&lt;br /&gt;
# On the right side, click on '''Mail'''.&lt;br /&gt;
# Under '''Address forward''' you can change the forward address of your ULYSSIS mail by clicking on '''edit'''.&lt;br /&gt;
# Choose '''forward''' and enter the email address you want to forward your ULYSSIS mail to and save the changes.&lt;br /&gt;
# If you forward to Gmail, Hotmail. or use Thunderbird, we recommend looking at [[Using a forwarder as an alias]] so you can send mails under the forwarding address instead of just your own.&lt;br /&gt;
&lt;br /&gt;
== Change the forwarders for other domains ==&lt;br /&gt;
&lt;br /&gt;
# Go to ucc.ulyssis.org and log in with your username and password.&lt;br /&gt;
# On the right side, click on '''Mail'''.&lt;br /&gt;
  [[File:Forwarder Step1.png|700px]]&lt;br /&gt;
# Under '''Virtual Domains''', click on the domain you want to change.&lt;br /&gt;
  [[File:Forwarder Step2.png|700px]]&lt;br /&gt;
# You can change a forwarder by clicking on '''edit''' or on '''Add alias''' and add the forwarders you want.&lt;br /&gt;
  [[File:Forwarder Step3.png|700px]]&lt;br /&gt;
# Save your changes&lt;br /&gt;
&lt;br /&gt;
== Use your mailbox and forwarders at the same time ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to set the forwarders, that will also allow you to use your mailbox and the webinterface, is to use a .forward file. On each line of this file, you can specify to wich addresses you want to forward the email. If one of the addresses is the same as your @ulyssis address, then the mail will also be placed in your ULYSSIS mailbox. In the following example, your @ulyssis email address is &amp;lt;code&amp;gt;user@ulyssis.org&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example .forward file:&lt;br /&gt;
&lt;br /&gt;
 user@ulyssis.org&lt;br /&gt;
 example@gmail.com&lt;br /&gt;
 example2@skynet.be&lt;br /&gt;
&lt;br /&gt;
This will place the email in your ULYSSIS mailbox so that you can access it from the webinterface or your local mailclient. It will also forward the mail to &amp;lt;code&amp;gt;example@gmail.com&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;example2@skynet.be&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To use this, place a .forward file with the prefered email addresses in your homedir, see [[Accessing your files]], and set your forwarder to 'Inbox' in https://ucc.ulyssis.org/mail&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Forwarder_Step3.png&amp;diff=631</id>
		<title>File:Forwarder Step3.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Forwarder_Step3.png&amp;diff=631"/>
		<updated>2018-08-04T17:14:42Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Forwarder_Step2.png&amp;diff=630</id>
		<title>File:Forwarder Step2.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Forwarder_Step2.png&amp;diff=630"/>
		<updated>2018-08-04T17:14:22Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=File:Forwarder_Step1.png&amp;diff=629</id>
		<title>File:Forwarder Step1.png</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=File:Forwarder_Step1.png&amp;diff=629"/>
		<updated>2018-08-04T17:14:03Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=619</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=619"/>
		<updated>2018-07-16T09:23:44Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended permissions ===&lt;br /&gt;
&lt;br /&gt;
* Homedirectory: &amp;lt;code&amp;gt;0701/drwx-----x&amp;lt;/code&amp;gt; &lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:config-php_dropdown.png]]&lt;br /&gt;
[[File:config-php_attrs.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:uploads_dropdown.png]]&lt;br /&gt;
[[File:uploads_attrs.png]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=618</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=618"/>
		<updated>2018-07-16T09:22:41Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* Recommended security settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended security settings ===&lt;br /&gt;
&lt;br /&gt;
* Homedirectory: &amp;lt;code&amp;gt;0701/drwx-----x&amp;lt;/code&amp;gt; &lt;br /&gt;
* www directory (and other directories from where websites are served), including subdirectories: &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:config-php_dropdown.png]]&lt;br /&gt;
[[File:config-php_attrs.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:uploads_dropdown.png]]&lt;br /&gt;
[[File:uploads_attrs.png]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=617</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=617"/>
		<updated>2018-07-16T09:22:09Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended security settings ===&lt;br /&gt;
&lt;br /&gt;
* Homedirectory: &amp;lt;code&amp;gt;0701/drwx-----x&amp;lt;/code&amp;gt; &lt;br /&gt;
* www directory (and other directories from where websites are served): &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
* Website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
* Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
* Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:config-php_dropdown.png]]&lt;br /&gt;
[[File:config-php_attrs.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:uploads_dropdown.png]]&lt;br /&gt;
[[File:uploads_attrs.png]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=616</id>
		<title>Secure file permissions</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Secure_file_permissions&amp;diff=616"/>
		<updated>2018-07-16T09:21:58Z</updated>

		<summary type="html">&lt;p&gt;Lars: Created page with &amp;quot;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP code is run with PHP-FPM as your ULYSSIS user. This means you can tighten up you website's security by denying other users the permission to read your PHP files. However, due to the way the Apache webserver works, it must be able to determine the existence of your PHP files. Non-PHP files in your www directory must remain readable by other users, because Apache reads these as it's own user.&lt;br /&gt;
&lt;br /&gt;
=== Recommended security settings ===&lt;br /&gt;
&lt;br /&gt;
 * Homedirectory: &amp;lt;code&amp;gt;0701/drwx-----x&amp;lt;/code&amp;gt; &lt;br /&gt;
 * www directory (and other directories from where websites are served): &amp;lt;code&amp;gt;0705/drwx---r-x&amp;lt;/code&amp;gt;&lt;br /&gt;
 * Website files (css, images, html, ...): &amp;lt;code&amp;gt;0604/-rw----r--&amp;lt;/code&amp;gt;&lt;br /&gt;
 * Configuration files containing secrets/passwords: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt;&lt;br /&gt;
 * Other directories and files that are not part of a website: &amp;lt;code&amp;gt;0600/-rw-------&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0700/-rwx------&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Securing database login info ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have a file called &amp;lt;code&amp;gt;config.php&amp;lt;/code&amp;gt;, containing login information for your database. To secure this information, you can make it readable and writeable by only you, and nobody else using &amp;lt;code&amp;gt;chmod 600 config.php&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:config-php_dropdown.png]]&lt;br /&gt;
[[File:config-php_attrs.png]]&lt;br /&gt;
&lt;br /&gt;
=== Securing uploads directory ===&lt;br /&gt;
&lt;br /&gt;
Also, if there are directories that you made writeable by others, e.g. an uploads folder, this is no longer necessary. If this directory is called &amp;lt;code&amp;gt;uploads&amp;lt;/code&amp;gt;, you can remove write rights for others with &amp;lt;code&amp;gt;chmod go-w uploads&amp;lt;/code&amp;gt;. In FileZilla, you can do this by right-clicking on the config file, clicking on &amp;quot;File permissions...&amp;quot;, and changing the permissions according to the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:uploads_dropdown.png]]&lt;br /&gt;
[[File:uploads_attrs.png]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=603</id>
		<title>Getting SSL/TLS</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=603"/>
		<updated>2018-05-22T19:18:15Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ULYSSIS does not sell or offer any other SSL certificates than our self-signed certificate. We will however guide requests and install a certificate from the KU Leuven is you are eligible for one, and we will also install certificates you have bought elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Requesting SSL from the KU Leuven==&lt;br /&gt;
The KU Leuven partners with other universities to use free SSL for its services, organisations and employees. We have permission to request SSL for Student Unions recognized by LOKO or another official body. Organisations (Vrije Verenigingen) are required to be recognized by LOKO or another official body and need to supply a reasoning why they need SSL. Individual users can request SSL but ICTS will only grant permission with elaborate reasoning.&lt;br /&gt;
&lt;br /&gt;
Before sending us a request the following steps have to be done:&lt;br /&gt;
*Setup the site that needs SSL&lt;br /&gt;
*Change the domain's organisation-attribute to ''KU Leuven'' or ''Katholieke Universiteit Leuven''&lt;br /&gt;
*Create a forwarder from hostmaster@yourdomain.tld to ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
Then you can send an email to ulyssis@ulyssis.org containing your name, the name of the organisation, what you will use SSL for and the domain and if needed a list of subdomains.&lt;br /&gt;
&lt;br /&gt;
We will then generate the required cryptographic key and request and submit them with ICTS. It usually takes a few days before they have had time to verify both the domain and then the request for SSL itself. As soon as ICTS approves the request we will install the certificate and notify you.&lt;br /&gt;
&lt;br /&gt;
==External certificates==&lt;br /&gt;
To install external certificates we require the certificate itself, the private key, and possibly the chain. We prefer you also send us (a link to) the documentation of your supplier. As certificate files, especially private keys, are a delicate matter we suggest you just email us the path in your homedirectory you've put them and we will move them over to the webserver safely. For more information concerning this procedure you can always contact us on ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
===Let's Encrypt===&lt;br /&gt;
We currently do not have an automated system for renewing and deploying certificates such as those supplied by Let's Encrypt. We are however looking into automating this process in the future. Since more of our users are starting to use Let's Encrypt, and all of their certificates need to be renewed frequently, we have a specific procedure now.&lt;br /&gt;
&lt;br /&gt;
For the first installation of a certificate, you will have to generate a new key as well as a certificate. For renewals, please '''always''' reuse the old key, so we only have to replace your certificate and not the key every few months.&lt;br /&gt;
&lt;br /&gt;
When wishing to add a certificate with Let's Encrypt to your website, or renew your existing one, first create a folder ''letsencrypt'' in your home folder. Then add a folder per domain or group of domains, then add the relevant files to the right domain folder. Please keep in mind that it is always good practice to have your key be only readable by you, so check your permissions. Always remove irrevelant files, we won't search for the right certificate. &lt;br /&gt;
&lt;br /&gt;
Rename your files like this:&lt;br /&gt;
 chain.pem -&amp;gt; interestingdomain.be.chain&lt;br /&gt;
 cert.pem -&amp;gt; interestingdomain.be.crt&lt;br /&gt;
 privkey.pem -&amp;gt; interestingdomain.be.key&lt;br /&gt;
&lt;br /&gt;
Your structure should look something like this:&lt;br /&gt;
 letsencrypt/&lt;br /&gt;
 ├── interestingdomain.be&lt;br /&gt;
 │   ├── interestingdomain.be.chain&lt;br /&gt;
 │   ├── interestingdomain.be.crt&lt;br /&gt;
 │   └── interestingdomain.be.key&lt;br /&gt;
 └── otherdomain.com&lt;br /&gt;
     ├── otherdomain.com.chain&lt;br /&gt;
     ├── otherdomain.com.crt&lt;br /&gt;
     └── otherdomain.com.key&lt;br /&gt;
&lt;br /&gt;
Once you have placed your files in the correct folder, you can send us an email clearly stating for which domains we need to add certificates and where the files are stored. If you are renewing existing certificates, also clearly state that in your email.&lt;br /&gt;
&lt;br /&gt;
We have largely automated the installation of certificates. If you do not follow these instructions, your request will be denied or you may end up with broken SSL. So make sure you follow this procedure carefully.&lt;br /&gt;
&lt;br /&gt;
===Check certificate for common mistakes===&lt;br /&gt;
&lt;br /&gt;
You can check if your certificate will likely be okay with a command-line tool on our shellservers: &amp;lt;kbd&amp;gt;ulyssis-certificate check interestingdomain.be&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If everything looks good, you should only see lines starting with &amp;lt;code&amp;gt;[ OK ]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Any line starting with &amp;lt;code&amp;gt;[FAIL]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[ABRT]&amp;lt;/code&amp;gt; means a check has failed, you must correct this error before asking us to install your certificate.&lt;br /&gt;
&lt;br /&gt;
==Logs==&lt;br /&gt;
Due to the nature of our setup (dumb loadbalancer combined with shibboleth on webworkers), all https traffic will seem to come from our loadbalancer IP address instead of the actual originating IP address. Keep this in mind when checking log files.&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=602</id>
		<title>Getting SSL/TLS</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Getting_SSL/TLS&amp;diff=602"/>
		<updated>2018-05-22T19:15:41Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* Let's Encrypt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ULYSSIS does not sell or offer any other SSL certificates than our self-signed certificate. We will however guide requests and install a certificate from the KU Leuven is you are eligible for one, and we will also install certificates you have bought elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Requesting SSL from the KU Leuven==&lt;br /&gt;
The KU Leuven partners with other universities to use free SSL for its services, organisations and employees. We have permission to request SSL for Student Unions recognized by LOKO or another official body. Organisations (Vrije Verenigingen) are required to be recognized by LOKO or another official body and need to supply a reasoning why they need SSL. Individual users can request SSL but ICTS will only grant permission with elaborate reasoning.&lt;br /&gt;
&lt;br /&gt;
Before sending us a request the following steps have to be done:&lt;br /&gt;
*Setup the site that needs SSL&lt;br /&gt;
*Change the domain's organisation-attribute to ''KU Leuven'' or ''Katholieke Universiteit Leuven''&lt;br /&gt;
*Create a forwarder from hostmaster@yourdomain.tld to ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
Then you can send an email to ulyssis@ulyssis.org containing your name, the name of the organisation, what you will use SSL for and the domain and if needed a list of subdomains.&lt;br /&gt;
&lt;br /&gt;
We will then generate the required cryptographic key and request and submit them with ICTS. It usually takes a few days before they have had time to verify both the domain and then the request for SSL itself. As soon as ICTS approves the request we will install the certificate and notify you.&lt;br /&gt;
&lt;br /&gt;
==External certificates==&lt;br /&gt;
To install external certificates we require the certificate itself, the private key, and possibly the chain. We prefer you also send us (a link to) the documentation of your supplier. As certificate files, especially private keys, are a delicate matter we suggest you just email us the path in your homedirectory you've put them and we will move them over to the webserver safely. For more information concerning this procedure you can always contact us on ulyssis@ulyssis.org&lt;br /&gt;
&lt;br /&gt;
===Let's Encrypt===&lt;br /&gt;
We currently do not have an automated system for renewing and deploying certificates such as those supplied by Let's Encrypt. We are however looking into automating this process in the future. Since more of our users are starting to use Let's Encrypt, and all of their certificates need to be renewed frequently, we have a specific procedure now.&lt;br /&gt;
&lt;br /&gt;
For the first installation of a certificate, you will have to generate a new key as well as a certificate. For renewals, please '''always''' reuse the old key, so we only have to replace your certificate and not the key every few months.&lt;br /&gt;
&lt;br /&gt;
When wishing to add a certificate with Let's Encrypt to your website, or renew your existing one, first create a folder ''letsencrypt'' in your home folder. Then add a folder per domain or group of domains, then add the relevant files to the right domain folder. Please keep in mind that it is always good practice to have your key be only readable by you, so check your permissions. Always remove irrevelant files, we won't search for the right certificate. &lt;br /&gt;
&lt;br /&gt;
Rename your files like this:&lt;br /&gt;
 chain.pem -&amp;gt; interestingdomain.be.chain&lt;br /&gt;
 cert.pem -&amp;gt; interestingdomain.be.crt&lt;br /&gt;
 privkey.pem -&amp;gt; interestingdomain.be.key&lt;br /&gt;
&lt;br /&gt;
Your structure should look something like this:&lt;br /&gt;
 letsencrypt/&lt;br /&gt;
 ├── interestingdomain.be&lt;br /&gt;
 │   ├── interestingdomain.be.chain&lt;br /&gt;
 │   ├── interestingdomain.be.crt&lt;br /&gt;
 │   └── interestingdomain.be.key&lt;br /&gt;
 └── otherdomain.com&lt;br /&gt;
     ├── otherdomain.com.chain&lt;br /&gt;
     ├── otherdomain.com.crt&lt;br /&gt;
     └── otherdomain.com.key&lt;br /&gt;
&lt;br /&gt;
Once you have placed your files in the correct folder, you can send us an email clearly stating for which domains we need to add certificates and where the files are stored. If you are renewing existing certificates, also clearly state that in your email.&lt;br /&gt;
&lt;br /&gt;
We have largely automated the installation of certificates. If you do not follow these instructions, your request will be denied or you may end up with broken SSL. So make sure you follow this procedure carefully.&lt;br /&gt;
&lt;br /&gt;
You can check if your certificate will likely be okay with a command-line tool on our shellservers: &amp;lt;kbd&amp;gt;ulyssis-certificate check interestingdomain.be&amp;lt;/kbd&amp;gt;.&lt;br /&gt;
If everything looks good, you should only see lines starting with &amp;lt;code&amp;gt;[ OK ]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Any line starting with &amp;lt;code&amp;gt;[FAIL]&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[ABRT]&amp;lt;/code&amp;gt; means a check has failed, you must correct this error before asking us to install your certificate.&lt;br /&gt;
&lt;br /&gt;
==Logs==&lt;br /&gt;
Due to the nature of our setup (dumb loadbalancer combined with shibboleth on webworkers), all https traffic will seem to come from our loadbalancer IP address instead of the actual originating IP address. Keep this in mind when checking log files.&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Securing_MediaWiki_using_Centrale_KU_Leuven_Login&amp;diff=574</id>
		<title>Securing MediaWiki using Centrale KU Leuven Login</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Securing_MediaWiki_using_Centrale_KU_Leuven_Login&amp;diff=574"/>
		<updated>2018-03-11T10:13:50Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About==&lt;br /&gt;
MediaWikiShibboleth is a MediaWiki extension created by ULYSSIS to allow for Shibboleth (Centrale KU Leuven) login. The extension disables editing and creating of (talk) pages by anonymous users, and requires Shibboleth authentication for account creation and login.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Before installing, you need to have SSL and Shibboleth (Centrale KU Leuven) login enabled on your domain.&lt;br /&gt;
For instructions on how to get SSL: https://docs.ulyssis.org/Getting_SSL&lt;br /&gt;
Information about requesting Shibboleth: https://docs.ulyssis.org/Shibboleth&lt;br /&gt;
Once you know everything is installed properly, you can proceed to install the extension.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
First, download the latest release from [https://github.com/ULYSSIS-KUL/MediaWikiShibboleth/releases/latest github]. Make sure to click the &amp;lt;code&amp;gt;MediaWikiShibboleth.zip&amp;lt;/code&amp;gt; download button. Then, unzip the zip file in your &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/extensions/&amp;lt;/code&amp;gt; directory. Finally, add the following lines to your &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/LocalSettings.php&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 wfLoadExtension('MediaWikiShibboleth');&lt;br /&gt;
 include 'extensions/MediaWikiShibboleth/MediaWikiShibboleth_body.php';&lt;br /&gt;
 &lt;br /&gt;
 $wgGroupPermissions['*']['edit'] = false;&lt;br /&gt;
 $wgGroupPermissions['*']['createtalk'] = false;&lt;br /&gt;
 $wgGroupPermissions['*']['createpage'] = false;&lt;br /&gt;
 $wgGroupPermissions['*']['writeapi'] = false;&lt;br /&gt;
&lt;br /&gt;
If you want to allow anonymous editing, you should &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; add the last 4 lines of the previous paragraph. Though this really defeats the purpose of the extension.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
MediaWikiShibboleth has 3 configuration options which allow for restricting who can log in to your wiki. These options work especially well with restricting the access of the wiki to logged-in users only. They can be configured in the &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/extensions/MediaWikiShibboleth/extension.json&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
=== Restricting access to logged-in users only ===&lt;br /&gt;
This option is not an option provided by the extension, but very useful in its context. If you do not want guest visitors to be able to view any page of your wiki, add the following line to your &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/LocalSettings.php&amp;lt;/code&amp;gt;: &lt;br /&gt;
&lt;br /&gt;
  $wgGroupPermissions['*']['read'] = false;&lt;br /&gt;
&lt;br /&gt;
=== MWSStudentsOnly ===&lt;br /&gt;
This option tells MediaWikiShibboleth to only allow students to log in. KU Leuven employees, alumni, doctorate students, teaching assistants etc. will not be able to log in. Set this option by changing&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: false,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: true,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
in &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/extensions/MediaWikiShibboleth/extension.json&amp;lt;/code&amp;gt;. If you combine this option with &amp;quot;Restricting access to logged-in users only&amp;quot;, only students will be able to view, log in and edit your wiki.&lt;br /&gt;
&lt;br /&gt;
=== MWSAllowedKULids ===&lt;br /&gt;
This option can be used to only allow specific KUL ids to log in. An example KUL id is &amp;quot;r0653730&amp;quot;. If this option is set to &amp;quot;&amp;quot;, no KUL id checking will be performed. Set this option by changing &lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: false,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: false,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;r0653730, r0300342, KUL id 3...&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
in &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/extensions/MediaWikiShibboleth/extension.json&amp;lt;/code&amp;gt;. You can add as many KUL ids as you like, separated by a comma.&lt;br /&gt;
&lt;br /&gt;
=== MWSAllowedDegrees ===&lt;br /&gt;
This option can be used to only allow persons enrolled in specific degrees/programmes to log in. An example KUL degree number is &amp;quot;51016742&amp;quot;. If this option is set to &amp;quot;[]&amp;quot;, no degree number checking will be performed. Set this option by changing &lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: false,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;config&amp;quot;: {&lt;br /&gt;
      &amp;quot;MWSStudentsOnly&amp;quot;: false,&lt;br /&gt;
      &amp;quot;MWSAllowedKULids&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
      &amp;quot;MWSAllowedDegrees&amp;quot;: &amp;quot;51016742, 51016835, 51016753...&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
in &amp;lt;code&amp;gt;&amp;lt;mediawiki installation folder&amp;gt;/extensions/MediaWikiShibboleth/extension.json&amp;lt;/code&amp;gt;. You can add as many degree numbers as you like, separated by a comma.&lt;br /&gt;
&lt;br /&gt;
==Operation==&lt;br /&gt;
When the extension is installed successfully, anonymous users will not be able to create an account and the account creation page will be removed from the home page. On the log in page, a new image is added: if you click on this image, you will be logged in using Shibboleth. If you want to log in with an explicit username/password combination, you can click &amp;quot;Password Login&amp;quot; to expand a login menu.&lt;br /&gt;
&lt;br /&gt;
The new log in page looks like this with &amp;quot;Password Login&amp;quot; expanded:&lt;br /&gt;
&lt;br /&gt;
[[File:Login.png]]&lt;br /&gt;
&lt;br /&gt;
==Creating accounts==&lt;br /&gt;
If you want to create password accounts, you can navigate to the CreateAccount special page (make sure you are logged in using an administrator account). This is necessary to create accounts for users without a KU Leuven login. You should select &amp;quot;Use a temporary random password and send it to the specified email address&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:CreateAccount.png]]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Overview&amp;diff=549</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Overview&amp;diff=549"/>
		<updated>2018-02-16T06:30:09Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* Security &amp;amp; anti-spam */  Remove page with misinformation&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, be 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;
* [[Help, my account has been disabled]]&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;
* [[Using SSHFS]]&lt;br /&gt;
* [[Making Backups]]&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 2016]]&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;
* [[Adding domain names|Adding domain names (.be, .com, .org, ...)]]&lt;br /&gt;
* [[Getting SSL|Getting SSL (https-security)]]&lt;br /&gt;
* [[Shibboleth|Shibboleth (Centrale KU Leuven Login)]]&lt;br /&gt;
* [[Basic authentication|Basic authentication in PHP]]&lt;br /&gt;
* [[Claiming a port]]&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;
* [[ULYSSIS mail]]&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;
&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;
== CMSs ==&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;
&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;
* [[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;
* [[Anti-spam policies]]&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;
&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;
* [[Subversion]]&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;
* [[ULYSSIS public FTP]]&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;
* [[KULoket agenda iCal feed]]&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>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_MySQL&amp;diff=539</id>
		<title>Using MySQL</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Using_MySQL&amp;diff=539"/>
		<updated>2017-12-23T12:17:44Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* Accessing MySQL from outside of our network */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Creating a MySQL user==&lt;br /&gt;
To use MySQL on your ULYSSIS account you first need to create a MySQL user on [https://ucc.ulyssis.org UCC]. In the MySQL section of the panel you will be suggested to click a link to create a user. Then fill in a password for the database user. It is highly recommended that this password differs from the password you use for your account. Then you just click ''Create user'' and you are ready to go.&lt;br /&gt;
&lt;br /&gt;
==Creating a MySQL database==&lt;br /&gt;
After creating a MySQL user, you can simple press ''Add database'' in [https://ucc.ulyssis.org UCC] and enter the name for your new database. It will automatically be prefixed by your username.&lt;br /&gt;
&lt;br /&gt;
==Using MySQL for your website or application==&lt;br /&gt;
 Host: mysql.ulyssis.org&lt;br /&gt;
 Username: your account's username&lt;br /&gt;
 Password: the password you chose when you made the MySQL user&lt;br /&gt;
 Database: the database name you chose, prefixed by your username&lt;br /&gt;
&lt;br /&gt;
For example, if my username is foobar, I made a database called website and I were to create a PHP website I would use something like:&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$db = new mysqli('mysql.ulyssis.org', 'foobar', 'correct horse battery staple', 'foobar_website');&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;$db = new PDO('mysql:host=mysql.ulyssis.org;dbname=foobar_website', 'foobar', 'correct horse battery staple');&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Managing MySQL with PHPMyAdmin==&lt;br /&gt;
Using your username and password you can easily manage your MySQL databases, tables and records on https://phpmyadmin.ulyssis.org&lt;br /&gt;
&lt;br /&gt;
==Accessing MySQL from outside of our network==&lt;br /&gt;
To prevent unnecessary load on our database server by hackers and bots it is only available inside of our network. If you wish to access it externally the easiest way is to use an SSH-tunnel. In many mysql management tools this is already supported. On Linux, Mac OSX and other Unix-like Operating Systems it is also easily possible to use the following command to create a tunnel to a local port (in this case 3300)&lt;br /&gt;
 ssh -f username@ssh2.ulyssis.org -L 3300:mysql.ulyssis.org:3306 -N&lt;br /&gt;
&lt;br /&gt;
While this command is running, you can connect to the MySQL server with host 'localhost' and port '3300'.&lt;br /&gt;
To terminate the port forwarding, press ctrl-C in the terminal.&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Renewing_your_account&amp;diff=515</id>
		<title>Renewing your account</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Renewing_your_account&amp;diff=515"/>
		<updated>2017-09-27T05:39:40Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;3 weeks before your account expires you will start receiving emails reminding you to renew your account. These will continue until your account expires.&lt;br /&gt;
&lt;br /&gt;
To renew your account you visit https://ucc.ulyssis.org/accounts and, while making sure you are '''not''' logged into a ULYSSIS Account, login using the Central KU Leuven Login and select your account (the renewal option will only be available if the account is in the renewal period of 3 weeks or has expired already).&lt;br /&gt;
&lt;br /&gt;
* Select your account option, you are free to upgrade your personal account to a higher tier now&lt;br /&gt;
* Verify your personal information (in case of errors please contact ULYSSIS)&lt;br /&gt;
* Accept the terms of use&lt;br /&gt;
* Confirm your order&lt;br /&gt;
* An email will be sent to your KU Leuven emailaddress to confirm your order and with a request for payment.&lt;br /&gt;
* As soon as we have received and processed your payment your account will get renewed, you will receive a notification.&lt;br /&gt;
* If you are running late with your payment and you wish to prevent your account from getting expired you can contact ULYSSIS with a screenshot or scan that confirms the payment, we will then temporarily renew your account and verify that the money arrives within the near future.&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=473</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=473"/>
		<updated>2017-08-09T20:34:21Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* FastCGI */&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].&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 you ''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;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 ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/pre&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;
&amp;lt;div style=&amp;quot;background: #f2dede; color: #a94442; border: 1px solid #a94442; border-radius: 5px; padding: 5px&amp;quot;&amp;gt;'''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.&amp;lt;/div&amp;gt;&lt;br /&gt;
&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;
===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;pre&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;/pre&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;
* [http://flask.pocoo.org/docs/0.10/deploying/fastcgi/ Flask documentation for FastCGI]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=417</id>
		<title>Exporting your KU Leuven class schedule and calendar</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=417"/>
		<updated>2016-12-19T11:19:06Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Set up agenda sync on KU Loket&lt;br /&gt;
## Visit [https://kuloket.be/ KU Loket]&lt;br /&gt;
## Go to the '''Education &amp;amp; Students''' (Onderwijs &amp;amp; studenten) tab [[File:KULoket-Agenda-Step1.png|thumb|200px]]&lt;br /&gt;
## Click '''Agenda sync'''&lt;br /&gt;
## Click '''Configure agenda''' (Agenda instellen) [[File:KULoket-Agenda-Step2.png|thumb|200px]]&lt;br /&gt;
## Change the switch '''Show schedule in my agenda''' (Toon uurrooster in mijn agenda) to '''On'''. [[File:KULoket-Agenda-Step3.png|thumb|200px]] You will have to wait about 15 minutes before continuing to the next step.&lt;br /&gt;
# Visit https://owa.student.kuleuven.be and log in with your KU Leuven credentials.&lt;br /&gt;
# In the top menu bar, click '''Calendar''' (Agenda)&lt;br /&gt;
# On the top right (below the menu bar), click the '''Share''' (Delen) button. A side-panel appears.&lt;br /&gt;
# Enter a non-KU Leuven email address in the '''Share with''' (Delen met) textfield.  After filling the email address, press the enter key.&lt;br /&gt;
# Make sure '''Full details''' (Volledige informatie) is selected in the dropdown next to your email address&lt;br /&gt;
# Click the '''Send''' (Verzenden) button at the top of the side-panel.&lt;br /&gt;
# You will receive an email with two weblinks. The first link shows your calendar in your webbrowser, the second link is your iCal feed.&lt;br /&gt;
&lt;br /&gt;
Some applications will not accept a &amp;lt;code&amp;gt;webcal://&amp;lt;/code&amp;gt; URL.&lt;br /&gt;
If that is the case you can simply modify the URL to start with &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=413</id>
		<title>Exporting your KU Leuven class schedule and calendar</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=413"/>
		<updated>2016-12-19T10:56:59Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Set up agenda sync on KU Loket&lt;br /&gt;
## Visit [https://kuloket.be/ KU Loket]&lt;br /&gt;
## Go to the '''Education &amp;amp; Students''' (Onderwijs &amp;amp; studenten) tab&lt;br /&gt;
## Click '''Agenda sync'''&lt;br /&gt;
## Click '''Configure agenda''' (Agenda instellen)&lt;br /&gt;
## Change the switch '''Show schedule in my agenda''' (Toon uurrooster in mijn agenda) to '''On'''. You will have to wait about 15 minutes before continuing to the next step.&lt;br /&gt;
# Visit https://owa.student.kuleuven.be and log in with your KU Leuven credentials.&lt;br /&gt;
# In the top menu bar, click '''Calendar''' (Agenda)&lt;br /&gt;
# On the top right (below the menu bar), click the '''Share''' (Delen) button. A side-panel appears.&lt;br /&gt;
# Enter a non-KU Leuven email address in the '''Share with''' (Delen met) textfield.  After filling the email address, press the enter key.&lt;br /&gt;
# Make sure '''Full details''' (Volledige informatie) is selected in the dropdown next to your email address&lt;br /&gt;
# Click the '''Send''' (Verzenden) button at the top of the side-panel.&lt;br /&gt;
# You will receive an email with two weblinks. The first link shows your calendar in your webbrowser, the second link is your iCal feed.&lt;br /&gt;
&lt;br /&gt;
Some applications will not accept a &amp;lt;code&amp;gt;webcal://&amp;lt;/code&amp;gt; URL.&lt;br /&gt;
If that is the case you can simply modify the URL to start with &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=400</id>
		<title>Exporting your KU Leuven class schedule and calendar</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=400"/>
		<updated>2016-11-08T15:27:27Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.&lt;br /&gt;
&lt;br /&gt;
# Set up agenda sync as described in the [https://icts.kuleuven.be/docs/at/cm/ep/s/uurrooster/agenda ICTS manual]. You will have to wait about 15 minutes before continuing to the next step.&lt;br /&gt;
# Visit https://owa.student.kuleuven.be and log in with your KU Leuven credentials.&lt;br /&gt;
# In the top menu bar, click '''Calendar''' (Agenda)&lt;br /&gt;
# On the top right (below the menu bar), click the '''Share''' (Delen) button. A side-panel appears.&lt;br /&gt;
# Enter a non-KU Leuven email address in the '''Share with''' (Delen met) textfield.  After filling the email address, press the enter key.&lt;br /&gt;
# Make sure '''Full details''' (Volledige informatie) is selected in the dropdown next to your email address&lt;br /&gt;
# Click the '''Send''' (Verzenden) button at the top of the side-panel.&lt;br /&gt;
# You will receive an email with two weblinks. The first link shows your calendar in your webbrowser, the second link is your iCal feed.&lt;br /&gt;
&lt;br /&gt;
Some applications will not accept a &amp;lt;code&amp;gt;webcal://&amp;lt;/code&amp;gt; URL.&lt;br /&gt;
If that is the case you can simply modify the URL to start with &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=398</id>
		<title>Exporting your KU Leuven class schedule and calendar</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=398"/>
		<updated>2016-11-08T15:18:44Z</updated>

		<summary type="html">&lt;p&gt;Lars: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.&lt;br /&gt;
&lt;br /&gt;
# Set up agenda sync as described in the [https://icts.kuleuven.be/docs/at/cm/ep/s/uurrooster/agenda ICTS manual]. You will have to wait about 15 minutes before continuing to the next step.&lt;br /&gt;
# Visit https://owa.student.kuleuven.be and log in with your KU Leuven credentials.&lt;br /&gt;
# In the top menu bar, click '''Calendar''' (Agenda)&lt;br /&gt;
# On the top right (below the menu bar), click the '''Share''' (Delen) button. A side-panel appears.&lt;br /&gt;
# Enter a non-KU Leuven email address in the '''Share with''' (Delen met) textfield&lt;br /&gt;
# Make sure '''Full details''' (?) is selected in the dropdown next to your email address&lt;br /&gt;
# Click the '''Send''' (?) button at the top of the side-panel.&lt;br /&gt;
# You will receive an email with two weblinks. The first link shows your calendar in your webbrowser, the second link is your iCal feed.&lt;br /&gt;
&lt;br /&gt;
Some applications will not accept a &amp;lt;code&amp;gt;webcal://&amp;lt;/code&amp;gt; URL.&lt;br /&gt;
If that is the case you can simply modify the URL to start with &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=397</id>
		<title>Exporting your KU Leuven class schedule and calendar</title>
		<link rel="alternate" type="text/html" href="https://docs.ulyssis.org/index.php?title=Exporting_your_KU_Leuven_class_schedule_and_calendar&amp;diff=397"/>
		<updated>2016-11-08T14:14:01Z</updated>

		<summary type="html">&lt;p&gt;Lars: Created page with &amp;quot;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.  # Set up agenda sync as describ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;While relatively unknown, it is possible to create an automatically updating iCal feed of your KULoket agenda without using external services.&lt;br /&gt;
&lt;br /&gt;
# Set up agenda sync as described in the [https://icts.kuleuven.be/docs/at/cm/ep/s/uurrooster/agenda ICTS manual]. You will have to wait about 15 minutes before continuing to the next step.&lt;br /&gt;
# Visit https://owa.kuleuven.be (Note: there is no ''student'' in there) and log in with your KU Leuven credentials.&lt;br /&gt;
# In the top menu bar, click '''Calendar''' (Agenda)&lt;br /&gt;
# On the top right (below the menu bar), click the '''Share''' (Delen) button. A side-panel appears.&lt;br /&gt;
# Enter a non-KU Leuven email address in the '''Share with''' (Delen met) textfield&lt;br /&gt;
# Make sure '''Full details''' (?) is selected in the dropdown next to your email address&lt;br /&gt;
# Click the '''Send''' (?) button at the top of the side-panel.&lt;br /&gt;
# You will receive an email with two weblinks. The first link shows your calendar in your webbrowser, the second link is your iCal feed.&lt;br /&gt;
&lt;br /&gt;
Some applications will not accept a &amp;lt;code&amp;gt;webcal://&amp;lt;/code&amp;gt; URL.&lt;br /&gt;
If that is the case you can simply modify the URL to start with &amp;lt;code&amp;gt;https://&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=367</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=367"/>
		<updated>2016-10-19T23:10:26Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* FastCGI */&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].&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 you ''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;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 ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/pre&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;
===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;pre&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;/pre&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;
* [http://flask.pocoo.org/docs/0.10/deploying/fastcgi/ Flask documentation for FastCGI]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
	<entry>
		<id>https://docs.ulyssis.org/index.php?title=Using_(Fast)CGI_for_non-PHP_websites&amp;diff=366</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=366"/>
		<updated>2016-10-19T23:10:07Z</updated>

		<summary type="html">&lt;p&gt;Lars: /* FastCGI */&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].&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 you ''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;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 ^(.*)$ starter.fcgi/$1 [QSA,L]&amp;lt;/pre&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;
===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;pre&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;/pre&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;
* [http://flask.pocoo.org/docs/0.10/deploying/fastcgi/ Flask documentation for FastCGI]&lt;/div&gt;</summary>
		<author><name>Lars</name></author>
	</entry>
</feed>