diff --git a/README.md b/README.md index ae4444d..7357255 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ After building redis, you should be able to run redis-server in rCore. Then, sta Then you should be able to connect to it using `redis-cli` over the network: ```bash +$ redis-cli -h 10.0.0.2 get abc +(nil) $ redis-cli -h 10.0.0.2 set abc def OK $ redis-cli -h 10.0.0.2 get abc @@ -69,3 +71,53 @@ $ redis-cli -h 10.0.0.2 get abc ``` Note: `redis-cli` in rCore is not working at the time. + +## How to use nginx + +Nginx is statically linked to musl instead, so there is no need to copy its dynamic loader. A nginx.conf is provided in this repo and automatically copied to its destination. So, just start `nginx` directly: + +```bash +/> nginx +``` + +Then you should be able to visit it via network: + +```bash +$ curl http://10.0.0.2/ + +Index of / + +

Index of /


../
+bin/                                               01-Jan-1970 00:00                   -
+biscuit/                                           01-Jan-1970 00:00                   -
+dev/                                               01-Jan-1970 00:00                   -
+etc/                                               01-Jan-1970 00:00                   -
+home/                                              01-Jan-1970 00:00                   -
+lib/                                               01-Jan-1970 00:00                   -
+media/                                             01-Jan-1970 00:00                   -
+mnt/                                               01-Jan-1970 00:00                   -
+opt/                                               01-Jan-1970 00:00                   -
+proc/                                              01-Jan-1970 00:00                   -
+root/                                              01-Jan-1970 00:00                   -
+run/                                               01-Jan-1970 00:00                   -
+rust/                                              01-Jan-1970 00:00                   -
+sbin/                                              01-Jan-1970 00:00                   -
+srv/                                               01-Jan-1970 00:00                   -
+sys/                                               01-Jan-1970 00:00                   -
+tmp/                                               01-Jan-1970 00:00                   -
+usr/                                               01-Jan-1970 00:00                   -
+var/                                               01-Jan-1970 00:00                   -
+busybox                                            01-Jan-1970 00:00             1141024
+nginx                                              01-Jan-1970 00:00              741288
+nginx-remote                                       01-Jan-1970 00:00              762440
+nginx.conf                                         01-Jan-1970 00:00                  99
+redis-cli                                          01-Jan-1970 00:00              221256
+redis-server                                       01-Jan-1970 00:00             1120888
+redis.conf                                         01-Jan-1970 00:00                  18
+

+ +``` + +It is generated by `autoindex`. + +Note: `nginx` might lead to an unresolved file system bug, so you might need to re-create sfs img after killing it. \ No newline at end of file