Skip to content

jamiebalfour04/mod_zpe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mod_zpe.c

mod_zpe is an Apache module for the ZPE Programming Environment and the YASS language. Use this to add support for the YASS language into the Apache Web Server.

mod_zpe.runtime.c

This version of mod_zpe is designed to run each script through the runtime and then close. It's slow but has more support.

mod_zpe.pm.c

This version of mod_zpe uses ZPE-PM and communicates using sockets. This is much faster but is only supported with version 1.14.4+.

Usage

If you have Apache's apxs command installed, use that to compile the file and install it into Apache:

apxs -c -i mod_zpe.pm.c

If you don't have apxs installed, use the make command and install using the following commands:

  • Copy all files as listed into a folder on your computer
  • Make sure you have the latest version of ZPE from GitHub.
  • Copy zpe.jar into a folder in the root called /zpe/ ()
  • Make sure make.sh is executable (chmod 755 make.sh)
  • Run the make.sh file with ./make.sh
  • Copy the resulting mod_zpe.so file into the appropriate directory (cp mod_zpe.so /usr/lib/apache2/modules/)
  • Restart Apache (httpd -k restart or apachectl -k restart)
  • Add the mod_zpe.load file into the /etc/apache2/mods-available folder with the following line:
    LoadModule zpe_module /usr/lib/apache2/modules/mod_zpe.so
  • Restart Apache (httpd -k restart or apachectl -k restart)

Apache HTTPD setup

<VirtualHost *:80>
  DocumentRoot /var/www/mywebsite/

  ServerName localhost
  <Directory "/var/www/mywebsite/">
        AddHandler zpe .ywp .yas .yep .yex
  </Directory>

</VirtualHost>

AddHandler zpe .yas AddHandler zpe .ywp

index.ywp

YASS Web Pages or YWP files work by embedding YASS code within <?ywp and ywp?>

  <!DOCTYPE html>
  <html>
    <head>
    </head>
    <body>
      <?ywp
        print("Hello world!")
      ywp?>
    </body>    
  </html>
  

About

An Apache module for the ZPE Programming Environment and the YASS language.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors