Difference between revisions of "Installing a webserver on AXIOM Beta"
From apertus wiki
Line 7: | Line 7: | ||
Install webserver: | Install webserver: | ||
pacman -S lighttpd | pacman -S lighttpd php php-cgi | ||
start the webservice: | |||
systemctl start lighttpd | |||
write any pending changes to the file system: | |||
sync | |||
==Configure Webserver== | |||
This is following the guide from the lighttpd archlinux wiki page: https://wiki.archlinux.org/index.php/lighttpd | |||
mkdir /etc/lighttpd/conf.d/ | |||
nano /etc/lighttpd/conf.d/cgi.conf | |||
and place the following content in the file: | |||
server.modules += ( "mod_cgi" ) | |||
cgi.assign = ( ".pl" => "/usr/bin/perl", | |||
".cgi" => "/usr/bin/perl", | |||
".rb" => "/usr/bin/ruby", | |||
".erb" => "/usr/bin/eruby", | |||
".py" => "/usr/bin/python", | |||
".php" => "/usr/bin/php-cgi" ) | |||
index-file.names += ( "index.pl", "default.pl", | |||
"index.rb", "default.rb", | |||
"index.erb", "default.erb", | |||
"index.py", "default.py", | |||
"index.php", "default.php" ) | |||
For PHP scripts you will need to make sure the following is set in /etc/php/php.ini | |||
cgi.fix_pathinfo = 1 | |||
In your Lighttpd configuration file, /etc/lighttpd/lighttpd.conf add: | |||
include "conf.d/cgi.conf" |
Revision as of 18:53, 13 August 2016
1 Installing required packages
Make sure the AXIOM Beta is connected to the internet and then on the commandline run:
Update mirrors database:
pacman -Syy
Install webserver:
pacman -S lighttpd php php-cgi
start the webservice:
systemctl start lighttpd
write any pending changes to the file system:
sync
2 Configure Webserver
This is following the guide from the lighttpd archlinux wiki page: https://wiki.archlinux.org/index.php/lighttpd
mkdir /etc/lighttpd/conf.d/ nano /etc/lighttpd/conf.d/cgi.conf
and place the following content in the file:
server.modules += ( "mod_cgi" )
cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".rb" => "/usr/bin/ruby", ".erb" => "/usr/bin/eruby", ".py" => "/usr/bin/python", ".php" => "/usr/bin/php-cgi" )
index-file.names += ( "index.pl", "default.pl", "index.rb", "default.rb", "index.erb", "default.erb", "index.py", "default.py", "index.php", "default.php" )
For PHP scripts you will need to make sure the following is set in /etc/php/php.ini
cgi.fix_pathinfo = 1
In your Lighttpd configuration file, /etc/lighttpd/lighttpd.conf add:
include "conf.d/cgi.conf"