How to fix “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” on Ubuntu Linux

apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
The easier way to fix it is by typing this command:

What it does it created the files called ‘fqdn’ fully qualified domain name and this will fix this error 🙂

root@amios:/# touch /etc/apache2/conf.d/fqdn | echo “ServerName localhost” >> /etc/apache2/conf.d/fqdn

If you want to fix more problems with your apache this is where you can find the logs.

In this way you can find apache logs files. Where they are ? Here 🙂

# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf

grep: /etc/httpd/conf/httpd.conf: No such file or directory

grep: /usr/local/etc/apache22/httpd.conf: No such file or directory

grep ErrorLog /etc/apache2/apache2.conf
# ErrorLog: The location of the error log file.

For Ubuntu 14+ to the below.

Use a text editor such as “sudo nano” at the command line or “gksudo gedit” on the desktop to create a new file,

$ sudo nano /etc/apache2/conf-available/fqdn.conf

or

$ gksu “gedit /etc/apache2/conf-available/fqdn.conf”

then add

ServerName localhost

to the file, save it, and enable your new configuration file by running the command below.

sudo a2enconf fqdn

This can all be done in a single command with the following:

$ echo “ServerName localhost” | sudo tee /etc/apache2/conf-available/fqdn.conf && sudo a2enconf fqdn

Django DatabaseError: no such column error

This is because you have amended your models and you have not changed your database.

Nothing to worry about!

For your info – > python manage.py syncdb ->  will NOT alter the existing schema in the database.

You need to run the python manage.py sqlall <your_app>

and then change your database based on the info given.

You may want to run python manage.py dbshell to do so

Or you can start using the Django addons calles South.

http://south.readthedocs.org/en/latest/installation.html

-> pip install South

-> Open up your apps -> settings.py

->add ‘South’ to your INSTALLED_APPS

-> run python manage. syncdb

-> then run python manage.py schememigration [yourapp_models] –initial

-> and again python manage.py migrate [yourapp_models]

Enjoy!

Did it resolve your problem?

Let me know post your comments !!

SSD Hosting for 5 dollars a month https://www.digitalocean.com/?refcode=71a52388956e