You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: remote-access/web-server/nginx.md
+31-17Lines changed: 31 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Setting up an NGINX web server on a Raspberry Pi
2
2
3
-
NGINX [engine x] is a popular lightweight web server application you can install on the Raspberry Pi to allow it to serve web pages.
3
+
NGINX (pronounced *engine x*) is a popular lightweight web server application you can install on the Raspberry Pi to allow it to serve web pages.
4
4
5
5
Like Apache, NGINX can serve HTML files over HTTP, and with additional modules can serve dynamic web pages using scripting languages such as PHP.
6
6
@@ -12,14 +12,19 @@ First install the `nginx` package by typing the following command in to the Term
12
12
sudo apt-get install nginx
13
13
```
14
14
15
+
and start the server with:
16
+
17
+
```bash
18
+
sudo /etc/init.d/nginx start
19
+
```
20
+
15
21
## Test the web server
16
22
17
23
By default, NGINX puts a test HTML file in the web folder. This default web page is served when you browse to `http://localhost/` on the Pi itself, or `http://192.168.1.10` (whatever the Pi's IP address is) from another computer on the network. To find the Pi's IP address, type `hostname -I` at the command line (or read more about finding your [IP address](../../troubleshooting/hardware/networking/ip-address.md)).
18
24
19
25
Browse to the default web page either on the Pi or from another computer on the network and you should see the following:
0 commit comments