Apache configuration in Mint 14 not working

3

I usually install mysql, apache and php using the following commands

sudo apt-get install apache2 php5 libapache2-mod-php5 php5-mysql 

but after I did a fresh upgrade to Linux mint 14, I got these two errors

* Starting web server apache2                                                  
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sun Mar 10 01:44:38 2013] [warn] NameVirtualHost *:8080 has no VirtualHosts
                                                                         [ OK ]
Setting up libapache2-mod-php5 (5.4.6-1ubuntu1.1) ...
 * Reloading web server config                                                  
 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sun Mar 10 01:44:39 2013] [warn] NameVirtualHost *:8080 has no VirtualHosts
                                                                         [ OK ] 

I get the same error when i restart apache server as well. I haven't been able to make changes the directory of the localhost because of this.

Bazinga777

Posted 2013-03-09T20:24:37.913

Reputation: 173

Those are only warnings and should not impact the performance of Apache. You won't see anything on the :8080 virtual host, but the default :80 should still be fine. What's your problem with the "directory of the localhost"? – Der Hochstapler – 2013-03-09T23:09:31.493

whenever i type http://localhost/ I get an error saying that the location does not exist.

– Bazinga777 – 2013-03-10T08:49:08.020

Answers

0

To fix that problem, you need edit your apache2.conf file (/etc/apache2/apache2.conf), and set ServerName.

Simply add the following line to the file:

ServerName localhost

Save the file and exit the editor. Don't forget to restart apache.

TFM

Posted 2013-03-09T20:24:37.913

Reputation: 4 243

I looked for the httpd.conf file in my apache2 directory and there was no httpd.conf file there. It's strange, can I paste some other httpd.conf from somewhere else to make it work ?

Here are the contents of the directory

apache2.conf envvars mods-available ports.conf sites-enabled conf.d magic mods-enabled sites-available – Bazinga777 – 2013-03-10T08:47:34.480

@Bazinga777: OK, sorry, I didn't check which Linux you were running. Try this post for the possible location of the httpd.conf file.

– TFM – 2013-03-10T10:17:05.397

I tried it and i configured the localhost. Didn't work.I'm trying something else out right now. Will update the post if it works. – Bazinga777 – 2013-03-10T19:37:03.187