Issue configuring apache2
Posted: 20. July 2016 15:43
Hello everyone!
I deployed 2 applications on my Apache: 1) A Python application developed with Django 2) A web site
First I deployed my Python application and it worked correctly, as I could invoke a REST API with a GET on
I created two configuration files in
1) For Python:
I understand that the issue is on the Alias as both configuration files refers / (if I change it on my website configuration file, rest APIs work again).
I don't have an domain name for the rest APIs. How can I fix this?
I deployed 2 applications on my Apache: 1) A Python application developed with Django 2) A web site
First I deployed my Python application and it worked correctly, as I could invoke a REST API with a GET on
- Code: Select all
<ip>/rest/combo
- Code: Select all
http://<ip>
- Code: Select all
<ip>/rest/combo
I created two configuration files in
- Code: Select all
/etc/apache2/conf-enabled
1) For Python:
- Code: Select all
WSGIScriptAlias / /home/ubuntu/MyPythonApplication/MyPythonApplication/wsgi.py
WSGIPythonPath /home/ubuntu/MyPythonApplication
<Directory /home/ubuntu/MyPythonApplication/MyPythonApplication>
<Files wsgi.py>
Order deny,allow
Require all granted
</Files>
</Directory>
Alias /media/ /home/ubuntu/MyPythonApplication/media/
Alias /static/ /home/ubuntu/MyPythonApplication/static/
<Directory /home/ubuntu/MyPythonApplication/static>
Require all granted
</Directory>
<Directory /home/ubuntu/MyPythonApplication/media>
Require all granted
</Directory>
- Code: Select all
One for my website:
Alias / /home/ubuntu/MyWebsite/
<Directory /home/ubuntu/MyWebsite>
Require all granted
</Directory>
I understand that the issue is on the Alias as both configuration files refers / (if I change it on my website configuration file, rest APIs work again).
I don't have an domain name for the rest APIs. How can I fix this?