Could not reliably determine the server's fully qualified domain name

前端 未结 13 688
悲&欢浪女
悲&欢浪女 2020-11-29 19:09

I have just installed Apache 2.2.17, and I am using it first time.

Now when I try to start the server using the command service httpd start it gives me

相关标签:
13条回答
  • 2020-11-29 19:52

    If you are using windows, remove comment on these lines and set them as:

    Line 227 : ServerName 127.0.0.1:80 
    Line 235 : AllowOverride all 
    Line 236 : Require all granted
    

    Worked for me!

    0 讨论(0)
  • 2020-11-29 19:56
    1. sudo nano /etc/apache2/httpd.conf
    2. search for a text ServerName in nano editor <Ctrl + W>
    3. Insert the following line at the httpd.conf: ServerName localhost
    4. Just restart the Apache: sudo /usr/sbin/apachectl restart
    0 讨论(0)
  • 2020-11-29 19:57

    " To solve this problem You need set ServerName.

    1: $ vim /etc/apache2/conf.d/name For example set add ServerName localhost or any other name:

    2: ServerName localhost Restart Apache 2

    3: $ service apache restart For this example I use Ubuntu 11.10.1.125"

    0 讨论(0)
  • 2020-11-29 19:57

    If you are using windows there is something different sort of situation

    First open c:/apache24/conf/httpd.conf. The Apache folder is enough not specifically above path

    After that you have to configure httpd.conf file.

    Just after few lines there is pattern like:

    #Listen _____________:80
    Listen 80
    

    Here You have to change for the localhost.

    You have to enter ipv4 address for that you can open localhost.

    Refer this video link and after that just bit more.

    Change your environment variables:

    Image for Environment USER Variables in System setting

    In which you have to enter path:

    c:apache24/bin
    

    and
    same in the SYSTEM variables

    Image is for system variables path

    If any query feel free to ask.

    0 讨论(0)
  • 2020-11-29 19:58

    Here's my two cents. Maybe it's useful for future readers.

    I ran into this problem when using Apache within a Docker container. When I started a container from an image of the Apache webserver, this message appeared when I started it with docker run -it -p 80:80 my-apache-container.

    However, after starting the container in detached mode, using docker run -d -p 80:80 my-apache-container, I was able to connect through the browser.

    0 讨论(0)
  • 2020-11-29 19:59

    I was NOT getting the ServerName wrong. Inside your VirtualHost configuration that is causing this warning message, it is the generic one near the top of your httpd.conf which is by default commented out.

    Change

    #ServerName www.example.com:80
    

    to:

      ServerName 127.0.0.1:80
    
    0 讨论(0)
提交回复
热议问题