diff options
author | nathan <nathansmith@disroot.org> | 2025-08-14 10:01:59 -0600 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-08-14 10:01:59 -0600 |
commit | 1d553e75483b20af11d23470eb381a570b8eee83 (patch) | |
tree | 1c1df76978b67a724f6cad11ce04c240bfbf36dd /org/4get-guide.org | |
parent | d314081ada7a58a12293f4380d318da788c37ff5 (diff) |
Diffstat (limited to 'org/4get-guide.org')
-rw-r--r-- | org/4get-guide.org | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/org/4get-guide.org b/org/4get-guide.org index a815451..171bccd 100644 --- a/org/4get-guide.org +++ b/org/4get-guide.org @@ -37,26 +37,30 @@ If your reading this you likely already used lighttpd since there is no other reason you would pick lighttpd out of all the other web servers rofl. Well anyways here is a basic config for 4get to get you started. #+begin_src - server.modules += ("mod_cgi", "mod_rewrite", "mod_fastcgi") + server.modules += ("mod_rewrite", "mod_fastcgi") server.name = "<whatever the fuck you want>" server.document-root = "/usr/local/www/<whatever the fuck you want>" + server.pid-file = "/var/run/lighttpd.pid" index-file.names = ("index.php") - cgi.execute-x-only = "disable" - cgi.assign = (".php" => "/usr/local/bin/php-cgi") - fastcgi.server = ( ".php" => - ( "localhost" => - ( - "host" => "127.0.0.1", - "port" => 9123 - ) - ) - ) + fastcgi.server = ( + ".php" => ( + "localhost" => ( + "socket" => "/var/run/php/php-fpm.pid", + "broken-scriptfilename" => "enable" + )) + ) url.rewrite-once = ( "^(.*)/$" => "$1/" ) url.rewrite-if-not-file = ( "^([^?]*)(\?.*)?$" => "$1.php$2" ) #+end_src -Start lighttpd with =service lighttpd enable= and =service lighttpd start= -*btw in freebsd =service lighttpd restart= doesn't work so instead you have to -kill it with something like htop.* + +Next run =mkdir /var/run/php= and =chown www:www /var/run/php= to create the +directory for the sock + +To configure the sock path open =/usr/local/etc/php-fpm.d/www.conf= and set +this value somewhere: +#+begin_src + listen = /var/run/php/php-fpm.pid +#+end_src To prevent those annoying php warnings from showing up put these in =/usr/local/etc/php.ini= @@ -65,6 +69,15 @@ To prevent those annoying php warnings from showing up put these in display_errors = On #+end_src +To enable and start it run: +#+begin_src shell + service php_fpm enable + service lighttpd enable + service php_fpm start + service lighttpd start +#+end_src +\\ + * Tor proxy :PROPERTIES: :CUSTOM_ID: tor |