Netbook server notes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "32 bit! <pre> 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 <pre> <?php function d...") |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
http://netbook.abuissa.net/test2.php 🙌 |
|||
32 bit! |
32 bit! |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
razzi@YusefsComp:~$ cat Public/test2.php |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
[[/cdn-cgi/l/email-protection|[email protected]]]:~$ cat Public/test2.php |
|||
| ⚫ | |||
<pre> |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
</pre> |
|||
| ⚫ | |||
| ⚫ | |||
... |
... |
||
location / { |
location / { |
||
| Line 41: | Line 44: | ||
fastcgi_pass 127.0.0.1:9000; |
fastcgi_pass 127.0.0.1:9000; |
||
} |
} |
||
| ⚫ | |||
Stuff I installed |
Stuff I installed |
||
| ⚫ | |||
sudo apt install php7.2-cgi |
sudo apt install php7.2-cgi |
||
sudo apt install nginx |
sudo apt install nginx |
||
Latest revision as of 17:24, 26 October 2022
http://netbook.abuissa.net/test2.php 🙌
32 bit!
start-stop-daemon --background --start --exec /usr/bin/env -- /usr/bin/php-cgi -b 127.0.0.1:9000
[email protected]:~$ 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