Skip to content
Apache 2.4 module to allow Pascal program to be executed just like scripting language
Pascal Shell Batchfile
Branch: master
Clone or download

Latest commit

Latest commit fb5e3a3 Mar 18, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
bin add stub file Mar 14, 2020
.gitignore add capability to parse header Mar 16, 2020
LICENSE edit readme Mar 17, 2020
build.cfg.sample remove main_handler unit Mar 14, 2020
build.cmd remove main_handler unit Mar 14, 2020


Apache 2.4 module implementation which is capable to execute Pascal program just like scripting language. Read mod_pascal documentation for more information.



Compile mod_pascal

$ git clone
$ cd mod_pascal && ./ && ./

Add Apache configuration to load module

For example in Debian,

Create pascal.conf file in /etc/apache2/mods-available directory with content as follows,

<IfModule pascal_module>
    # handle all files having .pas extension
    AddHandler pascal-handler .pas

Create pascal.load file in /etc/apache2/mods-available directory with content as follows,

LoadModule pascal_module /path/to/

It is important that you use pascal_module to identify mod_pascal module and pascal-handler to identify handler.

Enable mod_pascal

Create symlink to pascal.conf and pascal.load in /etc/apache2/mods-enabled directory

$ cd /etc/apache2/mods-enabled
$ sudo ln -s /etc/apache2/mods-available/pascal.conf
$ sudo ln -s /etc/apache2/mods-available/pascal.load

Alternatively, you can also use a2enmod command to enable mod_pascal.

$ sudo a2enmod pascal

Restart Apache

$ sudo systemctl restart apache2

Execute Pascal program

Create Pascal program, for example /var/www/html/test.pas with content as follows,

    writeln('Hello from Pascal');

Open URL http://localhost/test.pas from Internet browser, you should see text Hello from Pascal printed in browser.

If test.pas is downloaded then you do not register mod_pascal with Apache correctly.

You can’t perform that action at this time.