Avatar of Pavan Shashidharan
Pavan Shashidharan

asked on 

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
* DjangoAWSApache Web Server

Avatar of undefined
Last Comment
Uwe Degenhardt
Avatar of Uwe Degenhardt
Uwe Degenhardt
Flag of Germany image

What has changed ? Did you update/upgrade your system/Apache ?
Avatar of Pavan Shashidharan
Pavan Shashidharan

ASKER

I did not change anything.. it’s weird suddenly it is showing default apache page. Can u help me sort this out please?
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Something must have happened.
yum update?
server restart?
Cloudfront change to another port?
Avatar of Pavan Shashidharan

ASKER

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.
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Do you use django via Apache mod_wsgi?
Can you post the last 100-200 rows of /var/log/apache2/error.log ?
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.
Avatar of Pavan Shashidharan

ASKER

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
Avatar of Pavan Shashidharan

ASKER

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
Avatar of Pavan Shashidharan

ASKER

Config file PDF attached
pricemyproperty_config.pdf
ok. the standard apache-log is  not telling you too much. From apache's end all is well. the errors are too old.
Avatar of Phil Phillips
Phil Phillips
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of Uwe Degenhardt
Uwe Degenhardt
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Pavan Shashidharan

ASKER

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.
I solved it for the client on the box via SSH
Apache Web Server
Apache Web Server

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

21K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo