20151108
Get CONNECTION_REFUSED when connecting to localhost
Details
After installing apache2.4, opened browser and tried to visit localhost. However, got the aforementioned error.
Solution
Used a command from stackoverflow to check which port httpd is listening to:
sudo lsof -P -n -iTCP -sTCP:LISTEN | grep httpd
Found that httpd was listening to 8080, while I typed 8079.
Get 403: You don't have permission to access / on this server.
Details
After getting the correct port, got 'You don't have permission to access / on this server.' error.
Solution
Folder misconfiguration. Solved by creating a new usergroup and adding the current user to that.
Don't chmod 777, instead, add a user to a group, and grant certain permissions to that group. Block any permission for other users. http://stackoverflow.com/questions/21797372/django-errno-13-permission-denied-var-www-media-animals-user-uploads
Ubuntu runs apache web server with 'www-data' username
20151109
Change django project name
Find all the references to the current project name, and replace them all. To find the current project name:
grep -rli project3 ./webapp
Deploy django with mysql, failed
Details:
Change all the possible settings, and restart django server, didn't work.
Solution:
restarted the apache server, and it worked.
20151114
Two use cases for public key encryption
Case 1: use pub key to encrypt, and pri key to decrypt
Case 2: use pri key ot encrypt hash, and pub key to decrypt
As a method to authenticate user and verify the message.