2

I am unable to connect to localhost after installing Apache. I checked with the following URLs: https//localhost , https//127.0.1.1 and https//127.0.1.1

Below is the log message I received and my IP address information:

avinash@ubuntu:/etc/init.d$ sudo service apache2 restart
[sudo] password for avinash: 
 * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName


avinash@ubuntu:/etc/init.d$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:54:d4:d1  
          inet addr:192.168.56.130  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe54:d4d1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14746 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7681 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17657949 (17.6 MB)  TX bytes:749463 (749.4 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:172 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9920 (9.9 KB)  TX bytes:9920 (9.9 KB)
2
  • 4
    How about http://localhost? Note the ':' in the URL. Mar 16, 2013 at 6:27
  • Can you post the output of this command = netstat -tunlp Apr 20, 2019 at 9:11

2 Answers 2

1

try using http:// for localhost instead of https://

http://localhost

https:// is for secure servers also the default local ip address is 127.0.0.1 not 127.0.1.1

1

Use the below URL:

http://localhost

Also add the below line to your apache2.conf file at /etc/apache2

ServerName localhost 

The above will suppress the warning

waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .