Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.37 KB | None | 0 0
  1. #/bin/bash
  2. #install base packages
  3. pacman -Syu lighttpd php-cgi fcgi
  4.  
  5. #configure lighttpd + php
  6. sed -i '/server.username        = "http"/server.username        = "www-data"/'
  7. sed -i '/server.groupname       = "http"/server.groupname   = "www-data"/'
  8. sed -i '/server.document-root   = "\/srv\/http"/server.document-root    = "\/var\/www"/'
  9.  
  10. sed -i '/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/' /etc/php/php.ini
  11.  
  12. #add to start up
  13. echo -e "/etc/rc.d/lighttpd start" >> /etc/rc.local
  14.  
  15. echo "
  16. server.modules += ( "mod_scgi",
  17.                    "mod_access",
  18.                    "mod_fastcgi",
  19.                    "mod_accesslog" )
  20.  
  21. server.indexfiles = ( "index.php", "index.html" )
  22.  
  23. server.error-handler-404   = "/dispatch.fcgi"
  24.  
  25. fastcgi.server = (
  26.                 ".php" =>
  27.                    ( "localhost" =>
  28.                        (
  29.                            "socket" => "/tmp/php-fastcgi.socket",
  30.                            "bin-path" => "/usr/bin/php-cgi"
  31.                        )
  32.                    )
  33. )
  34. scgi.server = (
  35.        "/RPC2" =>
  36.                ( "127.0.0.1" =>
  37.                        (                
  38.                                "socket" => "/tmp/rpc.socket",
  39.                                "disable-time" => 0,
  40.                                "check-local" => "disable"
  41.                        )
  42.                )
  43.        )" >> /etc/lighttd/lighttpd.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement