0

I'm trying to install a website built using the Python flask framework. For this I'm following this tutorial. I followed all steps successfully, but when trying to disable the default site and enable mywebsite with the following commands, but I get errors on both commands:

$ sudo a2dissite default
ERROR: Site default does not exist!
$ sudo a2ensite mywebsite.nl
ERROR: Site mywebsite.nl does not exist!

I've got mywebsite.nl in /etc/apache2/sites-available:

ubuntu@ip-xxx-xxx-xxx:/etc/apache2/sites-available$ ls -l
total 16
-rw-r--r-- 1 root root 1332 Jan  7  2014 000-default.conf
-rw-r--r-- 1 root root 6437 Jan  7  2014 default-ssl.conf
-rw-r--r-- 1 root root  335 Jul  7 13:57 mywebsite.nl

and the contents of mywebsite.nl are:

<VirtualHost *:80>
         WSGIDaemonProcess mywebsite
     WSGIScriptAlias / /var/www/mywebsite/app.wsgi

     <Directory /var/www/mywebsite>
            WSGIProcessGroup mywebsite
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
     </Directory>
</VirtualHost>

and the contents of /var/www/mywebsite/app.wsgi are:

import sys
sys.path.insert(0, '/var/www/mywebsite')

import app as application

Since I followed the whole tutorial, I'm kinda unsure where to look for the problem.

Does anybody have a tip on where to start debugging? All tips are welcome!

[EDIT]

From the output of a2ensite and a2dissite below I now understand that 000-default is the current default website to disable. But I don't understand why mywebsite.nl is not there. Any code I need to display here for you guys to understand this?

$ a2ensite
Your choices are: 000-default default-ssl
Which site(s) do you want to enable (wildcards ok)?
^C
$ a2dissite
Your choices are: 000-default
Which site(s) do you want to disable (wildcards ok)?
^C
kramer65
  • 1,442
  • 4
  • 26
  • 43

1 Answers1

2

Looks like your file has to end with .conf but in your case ends with .nl. Renaming it to mysite.nl.conf should fix it.

qasdfdsaq
  • 6,779