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/apache.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,14 @@ This means you have Apache working!
24
24
25
25
### Changing the default web page
26
26
27
-
This default web page is just a HTML file on the filesystem. It is located at `/var/www/index.html`. navigate to this directory in the Terminal and have a look at what's inside:
27
+
This default web page is just a HTML file on the filesystem. It is located at `/var/www/html/index.html`.
28
+
29
+
**Note: The directory was `/var/www` in Raspbian Wheezy but is now `/var/www/html` in Raspbian Jessie**
30
+
31
+
Navigate to this directory in the Terminal and have a look at what's inside:
This shows that there is one file in `/var/www/` called `index.html`. The `.` refers to the directory itself `/var/www/` and the `..` refers to the parent directory `/var/`.
47
+
This shows that there is one file in `/var/www/html/` called `index.html`. The `.` refers to the directory itself `/var/www/html` and the `..` refers to the parent directory `/www/`.
44
48
45
49
### What the columns mean
46
50
@@ -51,7 +55,7 @@ This shows that there is one file in `/var/www/` called `index.html`. The `.` re
51
55
5. The file size
52
56
6. The last modification date & time
53
57
54
-
As you can see, by default the `www` directory and `index.html` file are both owned by the `root` user. In order to edit the file, you must gain `root` permissions. Either change the owner to your own user (`sudo chown pi: index.html`) before editing, or edit with `sudo`, e.g. `sudo nano index.html`.
58
+
As you can see, by default the `html` directory and `index.html` file are both owned by the `root` user. In order to edit the file, you must gain `root` permissions. Change the owner to your own user with `sudo chown pi: index.html` before editing.
55
59
56
60
Try editing this file and refreshing the browser to see the web page change.
57
61
@@ -82,19 +86,19 @@ sudo nano index.php
82
86
and put some PHP content in it:
83
87
84
88
```php
85
-
<?php echo "hello world";
89
+
<?php echo "hello world"; ?>
86
90
```
87
91
88
92
Now save and refresh your browser. You should see "hello world". This is not dynamic but still served by PHP. Try something dynamic:
0 commit comments