Skip to content

Commit 1a1a642

Browse files
committed
Update Apache instructions for Jessie
Now use /var/www/html
1 parent 701151e commit 1a1a642

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

remote-access/web-server/apache.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ This means you have Apache working!
2424

2525
### Changing the default web page
2626

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:
2832

2933
```
30-
cd /var/www
34+
cd /var/www/html
3135
ls -al
3236
```
3337

@@ -40,7 +44,7 @@ drwxr-xr-x 12 root root 4096 Jan 8 01:28 ..
4044
-rw-r--r-- 1 root root 177 Jan 8 01:29 index.html
4145
```
4246

43-
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/`.
4448

4549
### What the columns mean
4650

@@ -51,7 +55,7 @@ This shows that there is one file in `/var/www/` called `index.html`. The `.` re
5155
5. The file size
5256
6. The last modification date & time
5357

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.
5559

5660
Try editing this file and refreshing the browser to see the web page change.
5761

@@ -82,19 +86,19 @@ sudo nano index.php
8286
and put some PHP content in it:
8387

8488
```php
85-
<?php echo "hello world";
89+
<?php echo "hello world"; ?>
8690
```
8791

8892
Now save and refresh your browser. You should see "hello world". This is not dynamic but still served by PHP. Try something dynamic:
8993

9094
```php
91-
<?php echo date('Y-m-d H:i:s');
95+
<?php echo date('Y-m-d H:i:s'); ?>
9296
```
9397

9498
or show your PHP info:
9599

96100
```php
97-
<?php phpinfo();
101+
<?php phpinfo(); ?>
98102
```
99103

100104
### Further - WordPress

0 commit comments

Comments
 (0)