Skip to content

Instantly share code, notes, and snippets.

View ademola25's full-sized avatar

Ademola Ayobami Tijani ademola25

View GitHub Profile
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
@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
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
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'
<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
@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:
@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