From Fedora Project Wiki
(test category) |
m (category) |
||
Line 74: | Line 74: | ||
</ol> | </ol> | ||
[[Category: | [[Category:Kaio]] | ||
[[Caregory:Web]] |
Revision as of 16:28, 14 August 2012
Introduction
This is the procedures for deploying a lighttpd + PHP server on Fedora. This has been done on Fedora 17 which systemd is built in.
Installation
- Install package "php-cli".
- Install package "lighttpd".
- Install package "lighttpd-fastcgi".
-
You can install it at once with yum:
$ su -c "yum install php-cli lighttpd lighttpd-fastcgi"
Modules Setup
- Gain access as user "root".
-
Open /etc/lighttpd/lighttpd.conf and uncomment the line:
##include "modules.conf"
-
Open /etc/lighttpd/modules.conf and uncomment the line:
#include "conf.d/fastcgi.conf"
-
Open /etc/lighttpd/conf.d/fastcgi.conf and add the following lines:
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi" ) ) )
Service Restart & Testing
-
Restart the lighttpd server:
$ su -c systemctl restart lighttpd.service
-
Create a file "test.php" in default home directory "/var/www/lighttpd/", with the following contents:
<?php echo phpinfo(); ?>
- Open the page "http://localhost/test.php" for results.