Please, kindly need help, after deployed flask application on ubuntu 14 into this path var/www/FlaskApp, Accessing my IP, it display correctly, So, i decided to point my domain to digital ocean which display “Apache2 Ubuntu Default Page”, please how do i remove this default page to display the content on var/www/FlaskApp
Here is my folder structure
var/www
---------------------FlaskApp
--------------------------- templates
--------------------------- static
--------------------------- app.py
---------------------html
---------------------scrapy.cfg
```
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
To resolve the issue of your domain showing the “Apache2 Ubuntu Default Page” instead of your Flask application, you will need to set up a Virtual Host in Apache for your Flask application and then disable the default configuration.
Having said that, you can just follow STEP 1 and STEP 3 and for a full guide, follow all steps.
Step 1: Set Up a Virtual Host for Your Flask App
/etc/apache2/sites-available/
for your Flask application.your_domain.com
with your actual domain and adjust paths if necessary.Step 2: Create the WSGI File
Step 3: Enable the New Virtual Host
then restart apache
Step 4: Update Your Application’s Import in WSGI
Make sure the application object in your
flaskapp.wsgi
file matches the one in yourapp.py
file. If yourapp.py
file looks something like this:Then your
flaskapp.wsgi
file should import it as:Final Note
Remember to replace placeholders in the configurations with actual values relevant to your application, such as
your_domain.com
,your_email@example.com
, andYourSecretKey
Hello,
I was able to solve this issue by below steps:
myproject here is depend on what you previously setup.
Edit: $ sudo vim /etc/nginx/sites-available/myproject
Find: server { listen 80; server_name server_domain_or_IP;
Replace server_domain_or_IP with your domain name.
Restart: $ sudo service apache2 restart
I’m having the exact same issue. I can’t get rid of the apache default page. I’m using apache as a reverse proxy only, so no content is served by apache itself. The reverse proxy works for any URL requested except for the main /, in that case I always get the default page. Already tried all mentioned things here.