Browse Source

H4: Fix links

master
Pekka Helenius 6 years ago
committed by GitHub
parent
commit
4b80634014
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      exercises/h4.md

+ 8
- 8
exercises/h4.md View File

@ -67,7 +67,7 @@ newuser@goauldhost:~$ sudo apt-get install apache2 && sudo ufw allow 80/tcp
newuser@goauldhost:~$ sudo a2enmod userdir newuser@goauldhost:~$ sudo a2enmod userdir
``` ```
5. Some PHP and userdir module related configurations seem to be predefined in packages provided on DigitalOcean server environment (such as # symbols in /etc/apache2/mods-enabled/php7.0.conf in order to enable PHP for user sites), unlike stated in [Exercise 3](https://github.com/Fincer-altego/basics-of-a-linux-server-school-course-/blob/master/h3.md).
5. Some PHP and userdir module related configurations seem to be predefined in packages provided on DigitalOcean server environment (such as # symbols in /etc/apache2/mods-enabled/php7.0.conf in order to enable PHP for user sites), unlike stated in [Exercise 3](https://github.com/Fincer/linux_server_setup/blob/master/exercises/h3.md).
6. Restart Apache HTTP daemon (HTTPD) after enabling _userdir_ module: 6. Restart Apache HTTP daemon (HTTPD) after enabling _userdir_ module:
@ -127,7 +127,7 @@ monkey@goauldhost:~$ mkdir public_html
Therefore we have created a new home site folder for the user _monkey_. Contents of this folder should be available like shown in the following picture: Therefore we have created a new home site folder for the user _monkey_. Contents of this folder should be available like shown in the following picture:
![monkeysite-samplepic](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/monkey-site.png)
![monkeysite-samplepic](https://github.com/Fincer/linux_server_setup/blob/master/images/apina-site.png)
**NOTE!** As you can see, Apache doesn't give any server information in the website view, thanks for the configurations done in step 8. **NOTE!** As you can see, Apache doesn't give any server information in the website view, thanks for the configurations done in step 8.
@ -229,7 +229,7 @@ newuser@goauldhost:~$ mkdir -p ./source_codes/apache2 && cd ./source_codes/apach
newuser@goauldhost:~/source_codes/apache2$ apt-get source apache2 newuser@goauldhost:~/source_codes/apache2$ apt-get source apache2
``` ```
After which add [source code patch file](https://github.com/Fincer-altego/basics-of-a-linux-server-school-course-/blob/e60bfe23814f5b72315daec144c31a75bc7f1ef0/patch_apache_servertokens.patch) into created _$HOME/source_codes/apache2_ folder.
After which add [source code patch file](https://github.com/Fincer/linux_server_setup/blob/master/patches/patch_apache_servertokens.patch) into created _$HOME/source_codes/apache2_ folder.
**NOTE!** I have personally created the patch file with Unix tool _diff_. The patch file is not downloaded from any suspicious website. You can always check the patch file code yourself if still hesitating. **NOTE!** I have personally created the patch file with Unix tool _diff_. The patch file is not downloaded from any suspicious website. You can always check the patch file code yourself if still hesitating.
@ -402,7 +402,7 @@ xdg-open http://174.138.2.190:80
The opening view should be as follows: The opening view should be as follows:
![emptypage-sample](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/empty-page-sample.png)
![emptypage-sample](https://github.com/Fincer/linux_server_setup/blob/master/images/empty-page-sample.png)
2. Create a new file _index.html_ in the directory $HOME/public_html of user _monkey_ (where $HOME=/home/monkey/) 2. Create a new file _index.html_ in the directory $HOME/public_html of user _monkey_ (where $HOME=/home/monkey/)
@ -494,7 +494,7 @@ It is understandable that line _RewriteEngine on_ doesn't need to be determined
I have had a Debian-based web server (LAMP) environment in the past years. I have included Apache access.log parts of that web server environment here (year 2014): I have had a Debian-based web server (LAMP) environment in the past years. I have included Apache access.log parts of that web server environment here (year 2014):
[Apache - access.log, example](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/apache-log-sample)
[Apache - access.log, example](https://github.com/Fincer/linux_server_setup/blob/master/other/apache-log-sample)
The log file reveals many suspicious connection attempts from Thailand and Netherlands, for example. The log file reveals many suspicious connection attempts from Thailand and Netherlands, for example.
@ -539,7 +539,7 @@ newuser@goauldhost:~$ unzip website_1.03_fincer.zip
4. It should be possible to open the website using URL _174.138.2.190_, and the website should look like the following: 4. It should be possible to open the website using URL _174.138.2.190_, and the website should look like the following:
![website-sample](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/pekkahh-website.png)
![website-sample](https://github.com/Fincer/linux_server_setup/blob/master/images/pekkahh-website.png)
5. Let's copy another website sample into folder $HOME/public_html/ of user _monkey_: 5. Let's copy another website sample into folder $HOME/public_html/ of user _monkey_:
@ -566,7 +566,7 @@ monkey@goauldhost:~/public_html$ rm -Rf ./{server_site,server_site.tar.xz}
The deployed website can be viewed in URL address _http://174.138.2.190:80/~monkey_, and they look as follows: The deployed website can be viewed in URL address _http://174.138.2.190:80/~monkey_, and they look as follows:
![workprice-samplesite](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/workprice-site_example.png)
![workprice-samplesite](https://github.com/Fincer/linux_server_setup/blob/master/images/workprice-site_example.png)
**y)** Set up a simple PHP webpage on your web server. For instance, you can print a remote address of the user ( $_SERVER['REMOTE_ADDR'] ) etc. Be careful if you use input forms of any kind. **y)** Set up a simple PHP webpage on your web server. For instance, you can print a remote address of the user ( $_SERVER['REMOTE_ADDR'] ) etc. Be careful if you use input forms of any kind.
-------------- --------------
@ -584,7 +584,7 @@ bmicalc.html 100% 523
The following image demonstrates a web browser view of URL address _174.138.2.190/bmicalc.html_. On the left side: the source code of the HTML page. On the right side: server-side "raw" PHP source code which is not seen by the client program, our web browser in this case (PHP code = server-side execution/only web server sees the code, JavaScript code = client-side execution/client can see the code, too): The following image demonstrates a web browser view of URL address _174.138.2.190/bmicalc.html_. On the left side: the source code of the HTML page. On the right side: server-side "raw" PHP source code which is not seen by the client program, our web browser in this case (PHP code = server-side execution/only web server sees the code, JavaScript code = client-side execution/client can see the code, too):
![bmicalc-sample](https://raw.githubusercontent.com/Fincer-altego/basics-of-a-linux-server-school-course-/master/bmicalc-sample.png)
![bmicalc-sample](https://github.com/Fincer/linux_server_setup/blob/master/images/bmicalc-sample.png)
**Edit** The following changes has been done after answering the assignment: **Edit** The following changes has been done after answering the assignment:


Loading…
Cancel
Save