7. Hosts in MAC/Unix
๏ Mac/Linux in terminal
sudo vi /etc/hosts
๏ and insert this
127.0.0.1 www.webcamp.com.local
8. Hosts in Windows
Open notepad as a administrator
Then open the file in
C:WindowsSystem32driversetchosts
insert
127.0.0.1 www.webcamp.com.local
Save the file. Make sure notepad doesn’t append .txt
to the file.
9. Creating a Virtual Host
๏ MAC
๏ Open /Applications/MAMP/conf/apache/httpd.conf
๏ Change
Listen 8888 -> Listen 80
ServerName localhost:8888 -> ServerName localhost
๏ Insert
NameVirtualHost *:80
Include /Users/computer_name/Desktop/vhost/*.conf //sample
๏ Create a new file with an extension .conf and save it to the folder
/Users/computer_name/Desktop/vhost and insert the code of virtual
host in this file.
10. Creating a Virtual Host
๏ WINDOWS
๏ Open C:wampbinapacheApache2.2.11confhttpd.conf
๏ Uncomment Include conf/extra/httpd-vhosts.conf
๏ Open the file in conf/extra/httpd-vhosts.conf
๏ Comment all except for the line NameVirtualHost *:80
๏ Then insert on the last line the code (next page)
32. GET vs POST
GET POST
Technical Body of HTTP
URL
Difference Request
Recommended viewing something changing
Usage without changing it something
33. GET vs POST
GET POST
๏ bookmark page ๏ sensitive information
๏ search engines can ๏ multi-part binary (file
Advantages upload)
index the page with
passed data ๏ large quantities of data
๏ size limitation ๏ can NOT bookmark
Disadvantages ๏ not for sensitive ๏ search engine can NOT
information index the page