• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 89
  • Last Modified:

AWS suddenly showing apache default page instead of my django application

Hi,

I have a django application running on AWS server. It was working all good from past 2 one month. Suddenly now apache2 default page is coming up.

Can anyone please help me with this?

Thanks
0
Pavan Shashidharan
Asked:
Pavan Shashidharan
  • 6
  • 6
  • 2
  • +1
1 Solution
 
Uwe DegenhardtIT-ManagerCommented:
What has changed ? Did you update/upgrade your system/Apache ?
0
 
Pavan ShashidharanWeb DeveloperAuthor Commented:
I did not change anything.. it’s weird suddenly it is showing default apache page. Can u help me sort this out please?
0
 
shalomcCTOCommented:
Something must have happened.
yum update?
server restart?
Cloudfront change to another port?
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
Pavan ShashidharanWeb DeveloperAuthor Commented:
Hi Shalomc,

After i found the default page in my domain , that's when I tried restarting Apache server.  I am pretty sure I didn't  change anything. Do you want me to share my credential securely? I am having sleepless night because of this. I would really appreciate any help.

Thanks.
0
 
shalomcCTOCommented:
Do you use django via Apache mod_wsgi?
0
 
Uwe DegenhardtIT-ManagerCommented:
Can you post the last 100-200 rows of /var/log/apache2/error.log ?
0
 
Uwe DegenhardtIT-ManagerCommented:
Also make sure, that you are really in the right directory. Produce a test-html file called: test.html with standard html like:
<html>
<body>
this is a test for xxx at time: xx.xx.xx
</body>
</html>
Then you can make sure, Apache is heading in the right directory. It sounds as if your virtual host header entries are lost.
0
 
Pavan ShashidharanWeb DeveloperAuthor Commented:
Hi,

The file /var/log/apache2/error.log is empty.

But /var/log/apache2/error.log.1 give following errors:

[Fri Apr 13 06:25:01.641554 2018] [wsgi:warn] [pid 27772:tid 140556838164352] mod_wsgi: Compiled for Python/2.7.11.
[Fri Apr 13 06:25:01.641571 2018] [wsgi:warn] [pid 27772:tid 140556838164352] mod_wsgi: Runtime using Python/2.7.12.
[Fri Apr 13 06:25:01.641893 2018] [mpm_event:notice] [pid 27772:tid 140556838164352] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Fri Apr 13 06:25:01.641908 2018] [core:notice] [pid 27772:tid 140556838164352] AH00094: Command line: '/usr/sbin/apache2'
[Fri Apr 13 06:54:52.774398 2018] [wsgi:error] [pid 22215:tid 140556730025728] /home/ubuntu/pricemyproperty/venv/local/lib/python2.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
[Fri Apr 13 06:54:52.774434 2018] [wsgi:error] [pid 22215:tid 140556730025728]   """)
[Fri Apr 13 06:54:53.051315 2018] [wsgi:error] [pid 22215:tid 140556730025728] /home/ubuntu/pricemyproperty/venv/local/lib/python2.7/site-packages/IPython/paths.py:69: UserWarning: IPython parent '/var/www' is not a writable location, using a temp directory.
[Fri Apr 13 06:54:53.051347 2018] [wsgi:error] [pid 22215:tid 140556730025728]   " using a temp directory.".format(parent))
[Fri Apr 13 06:54:53.141090 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /manager/html
[Fri Apr 13 08:56:54.724351 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /azenv.php
[Fri Apr 13 13:13:24.563165 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /azenv.php
[Fri Apr 13 13:57:55.027706 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /ccvv
[Fri Apr 13 15:57:15.247728 2018] [wsgi:error] [pid 22215:tid 140556612413184] Forbidden (CSRF cookie not set.): /
[Fri Apr 13 15:57:15.604120 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /wls-wsat/CoordinatorPortType
[Fri Apr 13 17:41:38.789183 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /cgi-bin/php
[Fri Apr 13 17:41:39.062193 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /cgi-bin/php5
[Fri Apr 13 17:41:39.335128 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /cgi-bin/php-cgi
[Fri Apr 13 17:41:39.607978 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /cgi-bin/php.cgi
[Fri Apr 13 17:41:39.880824 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /cgi-bin/php4
[Fri Apr 13 17:41:40.153781 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /cgi-bin/php5-cli
[Fri Apr 13 17:41:40.427904 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /cgi-bin/test.cgi
[Fri Apr 13 17:41:40.700974 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /cgi-sys/php5
[Fri Apr 13 17:45:09.113371 2018] [wsgi:error] [pid 22215:tid 140556730025728] Not Found: /azenv.php
[Fri Apr 13 18:46:18.842476 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /robots.txt
[Fri Apr 13 18:46:21.219566 2018] [wsgi:error] [pid 22215:tid 140556612413184] Not Found: /robots.txt
0
 
Pavan ShashidharanWeb DeveloperAuthor Commented:
My django application is placed in '/home/ubuntu/pricemyproperty/' location on server.

Default apache page is located at '/var/www/html'. I am attaching you my config file for my django application. Please have a look at it
0
 
Pavan ShashidharanWeb DeveloperAuthor Commented:
Config file PDF attached
pricemyproperty_config.pdf
0
 
Uwe DegenhardtIT-ManagerCommented:
ok. the standard apache-log is  not telling you too much. From apache's end all is well. the errors are too old.
0
 
Phil PhillipsDirector of DevOps & Quality AssuranceCommented:
Does /etc/httpd/conf.d/welcome.conf exist?  That normally is the file that adds the default index.  If it does exist, try commenting everything out in there and restarting apache.
0
 
Uwe DegenhardtIT-ManagerCommented:
Hi Phil (and the others), in the meantime I took a look on the system via SSH. Obviously webserverfiles put under /home/ubuntu/... are not being able to run. I also tested it with another directory parallelly. It didn't work. I had this on another Ubuntu box last year. I moved all the files to /var/www/html and afterwards it worked. Weird. P.S.: I doublechecked all the file permissions and ownerships. ;-)
1
 
Pavan ShashidharanWeb DeveloperAuthor Commented:
Hi all,

My problem is solved. A huge thanks to my friend Uwe, who went out of his way to help me sort out my issue.
1
 
Uwe DegenhardtIT-ManagerCommented:
I solved it for the client on the box via SSH
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 6
  • 6
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now