Om te installeren en configureren mod_python ubuntu zie http://www.eecho.info/Echo/python/configureren-modpython-ubuntu-debian/
Snel start met Publisher Handler
Het volgende voorbeeld toont een eenvoudige feedback formulier. Het formulier zal vragen de naam, e-mailadres en een opmerking en een e-mail naar de webmaster verzenden met informatie. Deze eenvoudige aanvraag bestaat uit twee bestanden: form.html - het formulier voor het verzamelen van […]
Archive for the ‘Apache’ Category
mod_python ubuntu
Apache 2 File Locations
This section provides a quick overview of the default locations of the configuration files, binaries, and content associated with the Apache 2 Web server on your Ubuntu system:
/etc/apache2: A directory containing the configuration files for the Apache 2 Web server. The primary configuration file in this directory is the […]
Configureren modpython ubuntu, debian
Om te installeren apache2 en mod_python voer volgende opdrachten in terminal uit.
sudo apt-get install apache2
sudo apt-get install libapache2-mod-python
Verdere configuratie
Open in tekst editor default configuratie bestand
sudo vim /etc/apache2/sites-available/default
voeg volgende regels toe
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
# This directive allows us to have […]
Restart apache
Apache webserver wordt meestal met schripten beheerd om te heropstarten
# apachectl graceful (root)
of met opdrachten kunt u direct stopen en opstarten.
$ sudo /etc/init.d/apache stop
$ sudo /etc/init.d/apache start
apache installeren
Met drie opdrachten kan een apache webserver geïnstalleerd worden (ubuntu / debian)
$ sudo aptitude -r install apache2
$ aptitude wordt gebruikt om aanbevolen packages te installeren
$ chmod -R 775 /var/www/mysite_name/
mod_rewrite apache
Omschrijving: mod_rewrite herschrijven gevraagde URLs in parameters.
Voorbeeld:
Gevraagde url
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
wordt vertaald in
http://httpd.apache.org/index.php?m=docs&v=2.0§=mod&doc=mod_rewrite
Samenvatting
Deze module gebruikt herschrijving mechanisme die gebaseerd is op regular expression. Het ondersteund onbeperkt aantal regels (opdrachten) en onbeperkt aantal voorwaarden voor opdrachten. Manipulatie met url kunnen gedaan worden met (httpd.conf) in de server configuratie of voor een apart map (.htaccess)
Als […]
