Skip to content

Instantly share code, notes, and snippets.

View ademola25's full-sized avatar

Ademola Ayobami Tijani ademola25

View GitHub Profile
@ademola25
ademola25 / errors
Created August 17, 2018 07:46
linux conf
[Thu Aug 16 21:40:25.843420 2018] [mpm_event:notice] [pid 17312:tid 139811825444736] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations
[Thu Aug 16 21:40:25.843436 2018] [core:notice] [pid 17312:tid 139811825444736] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 16 21:40:35.562493 2018] [authz_core:error] [pid 17316:tid 139811654465280] [client 154.118.59.138:14471] AH01630: client denied by server configuration: /var/www/catalog/catalog.wsgi
@ademola25
ademola25 / content
Created August 17, 2018 07:50
cd /etc/apache2/apache2.conf
grader@ip-172-26-8-30:/etc/apache2$ sudo cat apache2.conf
[sudo] password for grader:
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
<VirtualHost *:80>
ServerName 18.184.157.123
ServerAdmin ubuntu@18.184.157.123
WSGIScriptAlias / /var/www/catalog/catalog.wsgi
<Directory /var/www/catalog/catalog/>
Require all granted
</Directory>
Alias /static /var/www/catalog/catalog/static
<Directory /var/www/catalog/catalog/static/>
Require all granted
grader@ip-172-26-8-30:/var/www/catalog$ sudo cat catalog.wsgi
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/catalog/")
from catalog import app as application
application.secret_key = 'Add your secret key'
grader@ip-172-26-8-30:/var/log/apache2$ sudo cat error.log.1
[Thu Aug 16 13:15:38.959933 2018] [wsgi:warn] [pid 15144:tid 139947188938624] mod_wsgi: Compiled for Python/3.5.1+.
[Thu Aug 16 13:15:38.959965 2018] [wsgi:warn] [pid 15144:tid 139947188938624] mod_wsgi: Runtime using Python/3.5.2.
[Thu Aug 16 13:15:38.960360 2018] [mpm_event:notice] [pid 15144:tid 139947188938624] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations
[Thu Aug 16 13:15:38.960374 2018] [core:notice] [pid 15144:tid 139947188938624] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 16 13:32:23.152545 2018] [authz_core:error] [pid 15148:tid 139946920724224] [client 154.118.59.138:26895] AH01630: client denied by server configuration: /var/www/catalog/catalog.wsgi
[Thu Aug 16 13:32:23.564522 2018] [authz_core:error] [pid 15147:tid 139946979473152] [client 154.118.59.138:14013] AH01630: client denied by server configuration: /var/www/catalog/catalog.wsgi, referer: http://18.184.157.123/
[T
@ademola25
ademola25 / project arrangement
Created August 17, 2018 08:47
how my project look like
grader@ip-172-26-8-30:/var/www/catalog$ ls
catalog catalog.wsgi
grader@ip-172-26-8-30:/var/www/catalog$ cd catalog
grader@ip-172-26-8-30:/var/www/catalog/catalog$ ls
README.md database_setup.py spa_category.db venv
__init__.py database_setup.pyc static
client_secrets.json lotsofspaitem.py templates
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at ubuntu@18.184.157.123 to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.18 (Ubuntu) Server at 18.184.157.123 Port 80
grader@ip-172-26-8-30:/var/log/apache2$ sudo cat error.log
[Fri Aug 17 11:37:33.299295 2018] [wsgi:warn] [pid 22149] mod_wsgi: Compiled for Python/3.5.1+.
[Fri Aug 17 11:37:33.299343 2018] [wsgi:warn] [pid 22149] mod_wsgi: Runtime using Python/3.5.2.
[Fri Aug 17 11:37:33.299358 2018] [core:warn] [pid 22149] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Aug 17 11:37:33.300670 2018] [mpm_prefork:notice] [pid 22149] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations
[Fri Aug 17 11:37:33.300684 2018] [core:notice] [pid 22149] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 17 11:37:39.384825 2018] [mpm_prefork:notice] [pid 22149] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Fri Aug 17 11:37:39.414823 2018] [wsgi:warn] [pid 2
grader@ip-172-26-8-30:/var/log/apache2$ sudo cat error.log
[Fri Aug 17 11:37:33.299295 2018] [wsgi:warn] [pid 22149] mod_wsgi: Compiled for Python/3.5.1+.
[Fri Aug 17 11:37:33.299343 2018] [wsgi:warn] [pid 22149] mod_wsgi: Runtime using Python/3.5.2.
[Fri Aug 17 11:37:33.299358 2018] [core:warn] [pid 22149] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Aug 17 11:37:33.300670 2018] [mpm_prefork:notice] [pid 22149] AH00163: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations
[Fri Aug 17 11:37:33.300684 2018] [core:notice] [pid 22149] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 17 11:37:39.384825 2018] [mpm_prefork:notice] [pid 22149] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Fri Aug 17 11:37:39.414823 2018] [wsgi:warn] [pid 2
(venv) grader@ip-172-26-8-30:/usr/local/lib/python3.5/dist-packages$ ls
click psycopg2
click-6.7.dist-info psycopg2-2.7.5.dist-info
flask pyasn1_modules
Flask-1.0.2.dist-info pyasn1_modules-0.2.2.dist-info
httplib2 __pycache__
httplib2-0.11.3.egg-info rsa
itsdangerous-0.24.egg-info rsa-3.4.2.dist-info
itsdangerous.py sqlalchemy
jinja2 SQLAlchemy-1.2.10.egg-info