Netbook server notes: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
razzi@YusefsComp:~$ cat Public/test2.php |
razzi@YusefsComp:~$ cat Public/test2.php |
||
<pre> |
<pre> |
||
<?php |
<?php |
Revision as of 17:22, 26 October 2022
32 bit!
start-stop-daemon --background --start --exec /usr/bin/env -- /usr/bin/php-cgi -b 127.0.0.1:9000
razzi@YusefsComp:~$ cat Public/test2.php
<?php function display_command($command) { echo $command; echo "\n"; echo shell_exec($command); echo "\n\n"; } display_command("uptime"); display_command("sensors"); display_command("sudo hddtemp /dev/sda"); ?>
/etc/nginx/sites-enabled/default
... location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; root /home/razzi/Public/; } # pass PHP scripts to FastCGI server # location ~ \.php$ { include snippets/fastcgi-php.conf; # include /etc/nginx/fastcgi_params; root /home/razzi/Public/; # With php-fpm (or other unix sockets): # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # With php-cgi (or other tcp sockets): fastcgi_pass 127.0.0.1:9000; }
Stuff I installed
sudo apt install php7.2-cgi sudo apt install nginx