Question

Connecting domain to droplet issue

Posted December 17, 2015 2.1k views
Apache Python DNS

Following the tutorial here (https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean) i was able to connect domain to my droplet but the issue here is when i navigate to www.careervacancy.com it load the page but when i try http://careervacancy.com, it load Apache home page, Below are the configuration,

A @ xxx.xxx.xx.xx
CNAME www careervacancy.com
CNAME * careervacancy.com

here is my conf file

VirtualHost *:80>
                ServerName careervacancy.com
                ServerAdmin info@careervacancy.com
                ServerAlias www.careervacancy.com
                WSGIScriptAlias / var/www/FlaskApp/flaskapp.wsgi
                <Directory /var/www/FlaskApp/static>
                        Order allow,deny
                        Allow from all
                </Directory>
                Alias /static /var/www/FlaskApp/static
                <Directory /var/www/FlaskApp/static/>
                        Order allow,deny
                        Allow from all
                </Directory>
                ErrorLog ${APACHE_LOG_DIR}/error.log
                LogLevel warn
                CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Please, whats missing? Thanks

2 comments
  • The VHOST should work, did you restart Apache after modifying?
    And whats the outpur in the apacheerror.log? Most of the time you willl find usefull info in there.

  • Thanks @CrypticDesigns, i’ve checked, no error… both pages are loading but the problem is they are loading different content, CAREERVACANCY.COM is loading Apache Index Page while WWW.CAREERVACANCY.COM is loading main content, How do i change the Apache index page to the main content???

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.

1 answer

In your VHOST you need to configure your root website folder. So add the following and modify it to your needs:

DocumentRoot /var/www/mywebsite
Submit an Answer