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
Pavan ShashidharanWeb DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Shalom CarmelCTOCommented:
Something must have happened.
yum update?
server restart?
Cloudfront change to another port?
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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
Shalom CarmelCTOCommented:
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 PhillipsDevOps ArchitectCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Django

From novice to tech pro — start learning today.