How to fix Apache – "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName" Error on Ubuntu

83 Flares 83 Flares ×
You might probably faced the same following error while you were restarting the Apache server on Ubuntu.
aslam@aslam:~$ sudo /etc/init.d/apache2 restart
* 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
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
sudo gedit /etc/apache2/httpd.conf
By default httpd.conf file will be blank. Now, simply add the following line to the file.
ServerName localhost
Save the file and exit from gEdit. Finally restart the server.
sudo /etc/init.d/apache2 restart
This entry was posted in Web Development and tagged , , , , , . Bookmark the permalink.

About me

Hello, there! I'm Aslam Najeebdeen, a web craftsman, a visionary, a Rubyist and founder of frontcube
  • http://aceofdatabase.info Zach

    THANK YOU. This was the simplest solution of any page I read. I read that httpd.conf is intentionally left blank now, which I didn’t quite expect at first. I am a n00b after all.

  • http://aceofdatabase.info Zach

    THANK YOU. This was the simplest solution of any page I read. I read that httpd.conf is intentionally left blank now, which I didn’t quite expect at first. I am a n00b after all.

  • Pinduur

    Thank’s :)

  • Pinduur

    Thank’s :)

  • V.Balaviswanathan

    Thank You Aslam I have done and now what I get is the warning message “The Alias directive in /etc/apache/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias”. I would be happy if you can sort out this problem as well through mail,,,,,, Thanks lol

    • loob7799

      Thanks it works.

  • V.Balaviswanathan

    Thank You Aslam I have done and now what I get is the warning message “The Alias directive in /etc/apache/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias”. I would be happy if you can sort out this problem as well through mail,,,,,, Thanks lol

  • loob7799

    Thanks it works.

  • setu

    thnks a lot…..

  • setu

    thnks a lot…..

  • joinkzz

    Hi Mr Aslam,

    I cant test my apache server…

    The requested URL /apache2-default/ was not found on this server.

    Restarting web server apache2
    … waiting

    I encounter the above messages…

    pls help me…

    i am setting up eGroupware

    thank you so much

    • http://mohamedaslam.com Aslam

      Hi Joinkzz,

      Can you please describe the steps that you followed? If you have made changes to the apache2.conf file which is located at /etc/apache2/apache2.conf file, or the hosts file located at /ect/hosts, please clearly state the changes that you have made.

  • joinkzz

    Hi Mr Aslam,

    I cant test my apache server…

    The requested URL /apache2-default/ was not found on this server.

    Restarting web server apache2
    … waiting

    I encounter the above messages…

    pls help me…

    i am setting up eGroupware

    thank you so much

    • http://mohamedaslam.com Aslam

      Hi Joinkzz,

      Can you please describe the steps that you followed? If you have made changes to the apache2.conf file which is located at /etc/apache2/apache2.conf file, or the hosts file located at /ect/hosts, please clearly state the changes that you have made.

  • joinkzz

    I followed your instruction
    To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
    sudo gedit /etc/apache2/httpd.conf

    Now, simply add the follwing line to the httpd.conf file.
    ServerName localhost

    Save the file and exit from gEdit.

    Finally restart the server.
    sudo /etc/init.d/apache2 restart

    and then this message showed…

    Restarting web server apache2 … waiting [ OK ]

    but when i checked htt://localhost/apache2-default to test my apache server is running,

    This message appears:

    The requested URL /apache2-default/ was not found on this server.

  • joinkzz

    I followed your instruction
    To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
    sudo gedit /etc/apache2/httpd.conf

    Now, simply add the follwing line to the httpd.conf file.
    ServerName localhost

    Save the file and exit from gEdit.

    Finally restart the server.
    sudo /etc/init.d/apache2 restart

    and then this message showed…

    Restarting web server apache2 … waiting [ OK ]

    but when i checked htt://localhost/apache2-default to test my apache server is running,

    This message appears:

    The requested URL /apache2-default/ was not found on this server.

  • sravan

    [Thu Jul 02 19:13:46 2009] [warn] The Alias directive
    Its really helped to me and still having below warning…please tell me how to avoid this warning…
    in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
    [Thu Jul 02 19:13:46 2009] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.

    • http://mohamedaslam.com Aslam

      Dear Joinkzz,

      I never setup the eGroupware. These days i’m little busy with my final year project. I’ll try that out and let you know the exact steps after my final presentation.

  • sravan

    [Thu Jul 02 19:13:46 2009] [warn] The Alias directive
    Its really helped to me and still having below warning…please tell me how to avoid this warning…
    in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
    [Thu Jul 02 19:13:46 2009] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.

  • http://mohamedaslam.com Aslam

    @ joinkzz

    Of course you can’t test the server by typing
    http://localhost/apache2-default on the server.

    It’s seems that your server is running properly. Because in the line

    “Restarting web server apache2 … waiting [ OK ] ”

    it tells that the server successfully restarted. To check the server whether it’s running or not, you can navigate your browser to
    http://localhost/

    If it says “It Works!”. Then it comes from your Apache server “www” directory. That means your server running successfully.

    If you need any further clarification, feel free to post your question here.

  • http://mohamedaslam.com Aslam

    @ joinkzz

    Of course you can’t test the server by typing
    http://localhost/apache2-default on the server.

    It’s seems that your server is running properly. Because in the line

    “Restarting web server apache2 … waiting [ OK ] ”

    it tells that the server successfully restarted. To check the server whether it’s running or not, you can navigate your browser to
    http://localhost/

    If it says “It Works!”. Then it comes from your Apache server “www” directory. That means your server running successfully.

    If you need any further clarification, feel free to post your question here.

  • joinkzz

    i am setting up an eGroupware software but i cant finish the setup. this result appears:

    * You appear to have MySQL support.
    * You appear to have MySQLi (php5) support.
    * No PostgreSQL support found. Disabling
    * No MS SQL Server support found. Disabling
    * No ODBC support found. Disabling
    * No Oracle support found. Disabling
    * You appear to have PHP session support. Enabling PHP sessions.
    * Found existing configuration file. Loading settings from the file…
    * You need to add some domains to your header.inc.php.

    what else should i do with this result?

    thank sir Aslam…

  • joinkzz

    i am setting up an eGroupware software but i cant finish the setup. this result appears:

    * You appear to have MySQL support.
    * You appear to have MySQLi (php5) support.
    * No PostgreSQL support found. Disabling
    * No MS SQL Server support found. Disabling
    * No ODBC support found. Disabling
    * No Oracle support found. Disabling
    * You appear to have PHP session support. Enabling PHP sessions.
    * Found existing configuration file. Loading settings from the file…
    * You need to add some domains to your header.inc.php.

    what else should i do with this result?

    thank sir Aslam…

  • http://mohamedaslam.com Aslam

    Dear Joinkzz,

    I never setup the eGroupware. These days i’m little busy with my final year project. I’ll try that out and let you know the exact steps after my final presentation.

  • joinkzz

    Oooops… I apologize, Mr Aslam…

    I’ll be expecting your help…

    Thank you so much…

  • joinkzz

    Oooops… I apologize, Mr Aslam… \

    I’ll be expecting your help…\

    Thank you so much…

  • http://www.lamiscela.net Junio Vitorino

    Wow, thanks a lot!

  • http://www.lamiscela.net Junio Vitorino

    Wow, thanks a lot!

  • Hannis

    Beautifully simple and worked for me. Thank you!

  • Hannis

    Beautifully simple and worked for me. Thank you!

  • lokesh kumar

    Superb yaar…I was really expecting this kind solution… Thank You…

  • lokesh kumar

    Superb yaar…I was really expecting this kind solution… Thank You…

  • http://adriancallaghan.co.uk adrian

    Its always nice to see clear concise answers to problems, thankyou

  • http://adriancallaghan.co.uk adrian

    Its always nice to see clear concise answers to problems, thankyou

  • Андрей

    Спасибо :)

  • Андрей

    Спасибо :)

  • Mairelin

    Thanks !!!!!

  • Mairelin

    Thanks !!!!!

  • furqan

    thanks buddy problem fixed :)

  • furqan

    thanks buddy problem fixed :)

  • rbeen

    THNXS, very simple and yet excelent fix my friend,
    greetings from méxico!

  • rbeen

    THNXS, very simple and yet excelent fix my friend,
    greetings from méxico!

  • engin

    Thank u very much, it worked

  • engin

    Thank u very much, it worked

  • http://www.8bqb.com ZouTong

    Thanks a lot ! I am a Chinese PHPER ~

  • http://www.8bqb.com ZouTong

    Thanks a lot ! I am a Chinese PHPER ~

  • Juanlu

    Thanks a lot!! Too simple!

  • Juanlu

    Thanks a lot!! Too simple!

  • Akila

    thanks.. it was very simple..
    thanks lot aslam..
    now im working with xampp without any prob..

    • Ela

      thanks, It solves my problem

  • Akila

    thanks.. it was very simple..
    thanks lot aslam..
    now im working with xampp without any prob..

  • http://webcrisps.wordpress.com Max Williams

    Great simple solution, thanks!

  • http://webcrisps.wordpress.com Max Williams

    Great simple solution, thanks!

  • Mohammad Kamran Liaqat

    Thanks a lot brother for providing the solution to a problem that has bothered so many.Most people proposing a fix on the web have really made it look quite complex, surprises me.

    Thanks again,
    Kamran.

  • Mohammad Kamran Liaqat

    Thanks a lot brother for providing the solution to a problem that has bothered so many.Most people proposing a fix on the web have really made it look quite complex, surprises me.

    Thanks again,
    Kamran.

  • http://www.nerdydork.com Dustin

    Nice easy solution. My httpd.conf file was completely blank so I wasn’t sure if that would work, but it did. Thanks for posting this.

  • http://www.nerdydork.com Dustin

    Nice easy solution. My httpd.conf file was completely blank so I wasn’t sure if that would work, but it did. Thanks for posting this.

  • http://www.kanchionline.net senthil

    So nice ASLAM
    it works

    thank u

  • http://www.kanchionline.net senthil

    So nice ASLAM
    it works

    thank u

  • Anton

    So simple yet effective. You rule dude! Thanks for sharing this solution.

  • Anton

    So simple yet effective. You rule dude! Thanks for sharing this solution.

  • Ferdaus

    Thanks Aslam, worked for me

  • Ferdaus

    Thanks Aslam, worked for me

  • Jonathan

    Tanks

  • Jonathan

    Tanks

  • TrotterJohn

    not enough of sleep and too easy solution, what a nice combo. greetings from finland anyway:)

  • TrotterJohn

    not enough of sleep and too easy solution, what a nice combo. greetings from finland anyway:)

  • Pieter

    another thanks ;)

  • Pieter

    another thanks ;)

  • http://www.dewbob.com DewBob

    A little over a day of searching…. Tried several other solutions…. All took numerous steps and did not work.

    What a beautifully simple solution. Wish I had found it first.

    Thank you so much!

  • http://www.dewbob.com DewBob

    A little over a day of searching…. Tried several other solutions…. All took numerous steps and did not work.

    What a beautifully simple solution. Wish I had found it first.

    Thank you so much!

  • http://www.sourcebits.com Prakash

    It was a big help to me. I just edited the httpd.conf and restarted the apache , it worked.

    Thanks

  • http://www.sourcebits.com Prakash

    It was a big help to me. I just edited the httpd.conf and restarted the apache , it worked.

    Thanks

  • Ela

    thanks, It solves my problem

  • DB

    Thanks for the important but easy steps to fix the problem.

    You might want to mention the .conf file will be blank just so it doesnt throw people off.

    • http://mohamedaslam.com Aslam

      Yeah. Post Edited.
      Thank you for the comment! :)

  • DB

    Thanks for the important but easy steps to fix the problem.

    You might want to mention the .conf file will be blank just so it doesnt throw people off.

    • http://mohamedaslam.com Aslam

      Yeah. Post Edited.
      Thank you for the comment! :)

  • Roberto

    Really simple,
    Thanks a lot!!!

  • Roberto

    Really simple,
    Thanks a lot!!!

  • Bigsib

    Thanks for keeping it simple…. best I have seen as a solution to a relatively small error.

  • Bigsib

    Thanks for keeping it simple…. best I have seen as a solution to a relatively small error.

  • Pingback: Everything Is Crap » Fix “Could not reliably determine the server’s fully qualified domain name” apache error

  • Peter

    Thank you its been great help

  • Peter

    Thank you its been great help

  • KNR

    hi Aslam… thanks for u help …after executing the server is starting properly in command prompt but in GUI its showing “Forbidden

    You don’t have permission to access / on this server.”

    can u pls help in solving this

    • http://mohamedaslam.com Aslam

      @KNR

      Hi, I think your folder permission not set correctly. You can check the permission for a particular folder by typing ls -la in your terminal.

      You can change the permission by

      chmod 766

      Try this and let me know if you still having the problem.

      Cheers..!

  • KNR

    hi Aslam… thanks for u help …after executing the server is starting properly in command prompt but in GUI its showing “Forbidden

    You don’t have permission to access / on this server.”

    can u pls help in solving this

    • http://mohamedaslam.com Aslam

      @KNR

      Hi, I think your folder permission not set correctly. You can check the permission for a particular folder by typing ls -la in your terminal.

      You can change the permission by

      chmod 766

      Try this and let me know if you still having the problem.

      Cheers..!

  • Johnson

    very good…thanx…..

  • Johnson

    very good…thanx…..

  • http://andersandersson.net Anders

    Very helpful! Thank you!

  • http://andersandersson.net Anders

    Very helpful! Thank you!

  • Serrano

    Thanks a lot! These simple steps fixed it for me :)

  • Serrano

    Thanks a lot! These simple steps fixed it for me :)

  • jeff

    awesome. simple. thank you.

  • jeff

    awesome. simple. thank you.

  • Jiji

    How to slove this issue?

    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs

  • Jiji

    How to slove this issue?

    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs

  • Ben

    Thanks a lot from Technobel

  • Ben

    Thanks a lot from Technobel

  • Rasyidi

    thanx a lot, problem fixed

  • Rasyidi

    thanx a lot, problem fixed

  • pritam chaudhuri

    thank you dude…
    it was really help full..
    i did it in no time..
    thanks again..

  • pritam chaudhuri

    thank you dude…
    it was really help full..
    i did it in no time..
    thanks again..

  • http://aclark.net Alex Clark

    Thanks Mohamed!

  • http://aclark.net Alex Clark

    Thanks Mohamed!

  • http://www.tlemcen.info saad

    merci mohamed solution super

  • http://www.tlemcen.info saad

    merci mohamed solution super

  • http://www.aspansyahbudin.wordpress.com aspansyahbudin

    Good solution, its work and make error message in my terminal dissappear. Thanks a lot.

  • http://www.aspansyahbudin.wordpress.com aspansyahbudin

    Good solution, its work and make error message in my terminal dissappear. Thanks a lot.

  • Gravata

    Thanks a lot !

  • Gravata

    Thanks a lot !

  • Tommy S.

    thx ;) you saved me a lot of time.. ;)

  • Tommy S.

    thx ;) you saved me a lot of time.. ;)

  • yurasuka

    Lol, I’ve stumbled across this page three times now to fix the same issue over and over again – doh!

    Thanks!

  • yurasuka

    Lol, I’ve stumbled across this page three times now to fix the same issue over and over again – doh!

    Thanks!

  • doug182

    THXS buddy!!!!!….its works!!….Nice job, GO AHEAD!!!!!!

  • doug182

    THXS buddy!!!!!….its works!!….Nice job, GO AHEAD!!!!!!

  • Pingback: [SOLVED] “Could not reliably determine the server’s fully qualified domain name, using … for ServerName” « RussenReaktor’s Weblog

  • BALAJI

    hi….thanks a lot…. its works…..

  • BALAJI

    hi….thanks a lot…. its works…..

  • Suffering Angel

    hi Mr. Aslam:
    i’ve a problem on installaing freeradius-dialupadmin, every time i write in the browser: https://localhost/dialupadmin, this error appears to me:
    An error occurred during a connection to localhost.

    SSL received a record that exceeded the maximum permissible length.

    (Error code: ssl_error_rx_record_too_long)

    i really don’t know how to do, i try to install ssl but i can’t resolve that problem. i really need ur help coz i’vn’t a good expertise with ubuntu. thank u 4 helping me.

    • http://mohamedaslam.com Aslam

      Hi, I really don’t understand why people hiding their Identity when they request help from others. I’m really disappointed. Anyway helping others is my passion.Basically ssl_error_rx_record_too_long denotes that the implementation of SSL on your server is not correct.

      1.Change your Virtual host file back to
      2. Ensure that port 443 is open and enabled on your server
      3. Ensure SSL is running on port 443.

  • Suffering Angel

    hi Mr. Aslam:
    i’ve a problem on installaing freeradius-dialupadmin, every time i write in the browser: https://localhost/dialupadmin, this error appears to me:
    An error occurred during a connection to localhost.

    SSL received a record that exceeded the maximum permissible length.

    (Error code: ssl_error_rx_record_too_long)

    i really don’t know how to do, i try to install ssl but i can’t resolve that problem. i really need ur help coz i’vn’t a good expertise with ubuntu. thank u 4 helping me.

    • http://mohamedaslam.com Aslam

      Hi, I really don’t understand why people hiding their Identity when they request help from others. I’m really disappointed. Anyway helping others is my passion.

      Basically ssl_error_rx_record_too_long denotes that the implementation of SSL on your server is not correct.

      1. Change your Virtual host file < VirtualHost *> back to <VirtualHost *:80>
      2. Ensure that port 443 is open and enabled on your server
      3. Ensure SSL is running on port 443.
  • Maniyeri

    Thanks a lot my friend….

  • Maniyeri

    Thanks a lot my friend….

  • Mehul7296

    hey thanks buddy

  • http://mohamedaslam.com Aslam

    I'm a firm believer in “Less is more!” :)

    Cheers.

  • Mehul7296

    hey thanks buddy

  • Dirk

    Thanks. You provided a concise start to finish resolution. Good job.

  • Dirk

    Thanks. You provided a concise start to finish resolution. Good job.

  • Ramashema

    thanx bro, very good,short and clear solution

  • rick

    Thanks mate!

  • Elias

    thanx pal

  • Ramashema

    thanx bro, very good,short and clear solution

  • rick

    Thanks mate!

  • Elias

    thanx pal

  • Yogalakshmi

    Hi thanks. I was able to restart Apache. I am new to Ubuntu and apache. What exactly does this do? Kindly explain.

    Yogalakshmi

  • Yogalakshmi

    Hi thanks. I was able to restart Apache. I am new to Ubuntu and apache. What exactly does this do? Kindly explain.

    Yogalakshmi

  • Ismael Jr

    Valeu amigo pela dica!!!

  • Ismael Jr

    Valeu amigo pela dica!!!

  • Rob Dank

    Wow… easiest fix i’ve found yet! Thanks man!!

  • Rob Dank

    Wow… easiest fix i've found yet! Thanks man!!

  • Ripka

    Thank you! So simple, so useful. :)

  • Ripka

    Thank you! So simple, so useful. :)

  • Asrarahamedk

    Assalamu alaikum Aslam. So happy to get the solution in your site, which was very easy and handy to refer. Jazakallah Khairan.

    • http://mohamedaslam.com Aslam

      Walaikum Salaam.

      Glad you like it.

      Shukran Alhamdulillah.!

  • Asrarahamedk

    Assalamu alaikum Aslam. So happy to get the solution in your site, which was very easy and handy to refer. Jazakallah Khairan.

  • http://mohamedaslam.com Aslam

    Walaikum Salaam.

    Glad you like it.

    Shukran Alhamdulillah.!

  • Ashraf

    Salam Aslam

  • Ashraf

    Sorry, i missed out in the last comment.

    I tried to use the above command but it still shows me up.

    * Restarting web server apache2
    apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
    [fail]

  • Ashraf

    Salam Aslam

  • Ashraf

    Sorry, i missed out in the last comment.

    I tried to use the above command but it still shows me up.

    * Restarting web server apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [fail]

  • mike

    Thank you. It’s exactly what I needed. :)

  • Trin Calway

    The simplest things can really aggravate. Thank you so much for this.

  • mike

    Thank you. It's exactly what I needed. :)

  • Trin Calway

    The simplest things can really aggravate. Thank you so much for this.

  • Maex

    Thx. I knew to set the ServerName anywhere, but didnt know where.

  • Maex

    Thx. I knew to set the ServerName anywhere, but didnt know where.

  • Varsha Jaikumar

    thanks a ton. :) Great help.

  • Varsha Jaikumar

    thanks a ton. :) Great help.

  • hesam

    than you mohamad your help is very practical and good

  • http://www.linkfunny.com Arjun

    thank you!

  • hesam

    than you mohamad your help is very practical and good

  • http://www.linkfunny.com Arjun

    thank you!

  • Thedrumgarage

    thank you!

  • Thedrumgarage

    thank you!

  • Lawrence

    It works. Thanks, and thanks

  • Lawrence

    It works. Thanks, and thanks

  • Prabhu G

    Thanks dude

  • Prabhu G

    Thanks dude

  • http://bnmng.wordpress.com/ bnmng

    In my installation of ubuntu, httpd.conf was blank so I edited apache2.conf instead, and it seems to work fine. Still, I wouldn’t have known what to do if not for your post. Thank you.
    Ben

  • http://bnmng.wordpress.com/ bnmng

    In my installation of ubuntu, httpd.conf was blank so I edited apache2.conf instead, and it seems to work fine. Still, I wouldn't have known what to do if not for your post. Thank you.
    Ben

  • Raj

    could not reliably determine the server’s fully qualified domain name, using 192.168.1.4 for server name

  • Nuribrah

    thanks pal. it works!!

  • Raj

    could not reliably determine the server's fully qualified domain name, using 192.168.1.4 for server name

  • Nuribrah

    thanks pal. it works!!

  • Rolf

    That was easy :). Thanks!

  • Heresh86

    Salam :-)
    shokran

  • Rolf

    That was easy :). Thanks!

  • Heresh86

    Salam :-)
    shokran

  • silentPump

    Thanks man, it is really cool.

  • silentPump

    Thanks man, it is really cool.

  • http://twitter.com/fiskeben Ricco Førgaard

    Thanks a lot!

  • http://twitter.com/fiskeben Ricco Førgaard

    Thanks a lot for this.

  • http://twitter.com/fiskeben Ricco Førgaard

    Thanks a lot!

  • http://twitter.com/fiskeben Ricco Førgaard

    Thanks a lot for this.

  • Kitosboy

    Thanks much. I real appreciate it. I tried and now phpMyadmin it works.

  • Kitosboy

    Thanks much. I real appreciate it. I tried and now phpMyadmin it works.

  • Ananbal2000

    I recieved the error “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” – from your guidance able to resolve the issue for apache 2.2.16. Thank you, Balaji

  • Ananbal2000

    I recieved the error “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” – from your guidance able to resolve the issue for apache 2.2.16. Thank you, Balaji

  • Rodroguett

    Muchas gracias por el post, me sirvio.

    Saludos

  • Rodroguett

    Muchas gracias por el post, me sirvio.

    Saludos

    • Justin Mahon

      Thank you for your generous post, was very helpful.

  • Justin Mahon

    Thank you for your generous post, was very helpful.

  • Mactech

    Thanks for the post!

  • Mactech

    Thanks for the post!

  • Madhobha

    awesome, simple and straight forward. Was struggling for days to fix the problem…Thank so much..All working now
    Thanks a billion times

  • Madhobha

    awesome, simple and straight forward. Was struggling for days to fix the problem…Thank so much..All working now
    Thanks a billion times

  • kaqpa

    Thanks a lot. You solve my problem;)

  • kaqpa

    Thanks a lot. You solve my problem;)

  • Gaurav Gupta

    thanks yaar u r really good……………………

  • Gaurav Gupta

    thanks yaar u r really good……………………

  • Pingback: unbuntu server10.04 LTS从无到有 | 未知味觉

    • simone

      Thank you so much!
      It finally works!

      Simone, Italy

  • omni

    not work

  • omni

    not work

  • Arif2127

    when i give command of edit then it shows the massage like “Gtk-WARNING **: cannot open display:”

  • Arif2127

    when i give command of edit then it shows the massage like “Gtk-WARNING **: cannot open display:”

  • Anon

    thank you so much !!!!!!
    really helped.

  • Anon

    thank you so much !!!!!!
    really helped.

  • Ppete

    Thank you so much for the advise! Worked like a charm.

  • Ppete

    Thank you so much for the advise! Worked like a charm.

  • WENK

    Thanks Mohamed! I had this error when trying to install LAMP as per instructions here:
    http://tuxtweaks.com/2009/10/install-lamp-on-ubuntu-9-10-karmic-koala

    The fix you suggested seems to have worked perfectly. Cheers — DW

  • WENK

    Thanks Mohamed! I had this error when trying to install LAMP as per instructions here:
    http://tuxtweaks.com/2009/10/install-lamp-on-ubuntu-9-10-karmic-koala

    The fix you suggested seems to have worked perfectly. Cheers — DW

  • Askari

    thank u boss……….. we get the solution following your instruction
    Sultan Askari
    India

  • Askari

    thank u boss……….. we get the solution following your instruction
    Sultan Askari
    India

  • simone

    Thank you so much!
    It finally works!

    Simone, Italy

  • Rudi

    Ah thanks, that’s one less annoying & pointless error message ;)

    Rudi, South Africa

  • Rudi

    Ah thanks, that’s one less annoying & pointless error message ;)

    Rudi, South Africa

  • Abinash

    The information was really helpful..thank you

  • Conradomonnerat

    thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuu!!!

  • Hareaswar

    Hi,

    I am using ubuntu server 9.04. while booting up the message is shown and i am unable to enter into shell command interface. any idea apart from reinstalling of the OS :(

    Thanks for your help

  • Axakal (Vitaly)

    I did “ServerName localhost”. That’s true =) Thnx

  • bhanu

    great! worked for me.

  • Lesterinside

    THANKS ALOT!!!

  • El Angel Negro

    Muchas Gracias por la aclaración.! aun en este año 2010 esta solución sigue funcionando.!
    Mil Gracias.!

  • Richard Pirona Miranda

    thanks so much i really needed it

  • Prajakta_0917

    thanks a lot.its really helpful

  • Fjesusarroyo

    hello, thank you very much for your help. I’m new and I know apache and I’ve been a lot of time trying to solve the problem.

    Greetings from Moron de la Frontera (Sevilla-Spain)

  • http://rahulprasad.com Rahul Prasad

    Dude its difficult to find the site in ur “Sharing is sexy” block, to share this stuff.
    It took me 30 sec to find Facebook !

  • kid1612

    thank you very much
    it work
    yahooo

  • Wannalovemani

    thank uuuu man u saved

  • http://thefekete.net Thefekete

    Thanks man… that’s like 14 less emails I get from the cron daemons on my servers!!!

  • Holloman_jadell

    Thank you………..

  • Madsravn

    Thanks! First entry to appear on google when I searched the error I had. Easy read and problem was fixed quickly!

  • MrBerry

    It has been seven and a half months that I’ve been searching for the answer to this problem, and now I solve it!

  • XenKode

    Thanks man !

  • VJ Mail

    Thanks

  • Okrah Asante

    thanx. it worked for me

  • http://twitter.com/knoldesparker Mads Jensen

    Thanks!

  • Urswithoutwax

    Varsha thnks it works

  • Skyman

    Awesome, can I replace localhost by something like http://www.example.com ?

    • http://mohamedaslam.com Aslam

      Yes. You can. For that you need to create virtual hosts. If you are using Dabian based linux distros, you can use my Speedy (Ruby Gem) to create virtual hosts instantly. Checkout http://speedy.frontcube.com

  • Rohit Kumar01

    Thanks

  • Ayanami08

    Tks, It’s very easy to fix :)

  • Salymsash

    Awesome, thanks a lot.

  • Sumwai Low

    Thanks, I always forgotten how to solve this.

  • Gpunpis

    Thanks a million ..you make the world go round..

  • Jasonc65

    That was helpful. But I still can’t figure out how to run a php file on my browser.

  • Pingback: How to fix Apache – “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” Error on Ubuntu « davidmccarthy

  • jobkite

    thanks

  • Jbreload

    not found!!!

  • Campim

    very simple, excellent!!!! thanks a lot for your help!!!! regards, daniel

  • Sakme

    Great thx!
    I’ve been looking for something like this in all web ;-)
    Your solution solved my problem.
    lov :*

  • wright

    HOLY COW!!! You are the only place I found with the right thing to do. I am real new to ubuntu 10.04 lt but I am learning real fast. I just set up the apache server and got it running and was wondering what to do about this constant error message.

    Thank you so much!

    wright

  • Joe116

    Life Saver…

  • rajitha

    Thanks and Great

  • Adyan Anwar

    Thank you so much! It solved my apache problem so quicky.

    -adyan anwar

  • Danail

    Thank you so much! It solved my apache problem with your help :)

  • Praveenpokuri

    thanks…..

  • http://profiles.google.com/tayloreke taylor eke

    It’s so obvious that I just got lost in every other forum, thank you so much for posting this super helpful!

  • linux newbie

    THANKS A BUNCH!!!

  • http://twitter.com/haydenhancock Hayden Hancock

    Thanks works like a charm (10.04 LTS).

  • http://profiles.google.com/13or.tresor Trésor Tshishi

    Merci ! Thank you ! Obrigado !Gracias …

  • http://www.tunafunga.com brianherbert

    Thanks for the pointer!

  • drew

    this only the only answer i found that worked for my problem. thank you!

  • Khanpeach

    Thanks alot this issue was pending for long time in my system

  • Shorty__45

    hell yes !

  • Tian_simh

    thanks

  • http://www.facebook.com/sarotpb สาโรจน์ เพ็งบุญ

    Thank you so much.

    My problem is to solve the problem.

  • Smokingbob2011

    Thanks !!!

    All brazil gives a hug on you bro!!!!

    João Abbud

  • wibf

    thank you it solved but why it happened…

  • Саша Стаменковић

    Nice one! Thanks.

  • http://twitter.com/rogerio_garcia Rogerio Garcia

    Thank you.

    Valeu!

  • Hello

    change the /etc/hosts file should look like – of course replace ip-address and server name:
    in my case you get:

    127.0.0.1       localhost.localdomain localhost sd-22547
    88.194.65.194   sd-22547.dedibox.fr     sd-22547

     

  • http://twitter.com/rogerio_garcia Rogerio Garcia

    Thank you.

    Valeu!

  • Rikoy

    thanks, this help my problem..

  • Seth

    Thank you so much for the fix! It is a big help

  • Haftom

    Thanks, fixed

  • Pawelkibicbarcy

    Thanks

  • Elwon

    Bally awesomeness.

  • Dylanderr

    WOW!!! all i gotta say is thanks, worked 100%

  • Herbert

    So funny error ^^ Thanks you ;)

  • http://mohamadazmath.blogspot.com Azmath Mohamad

    Nice post, helped to resolve the issue.

  • guest

    thanks

  • Oscar

    thanks for the help!!!

  • Mrmjtudor

    Cool

  • Saif Saffi

    good effort keep it up from Saif ur Rehman thanks . 

  • http://www.chandan.org Chandan

    thanks man. it worked and corrected for me 

  • Guest

    Thanks a lot :)

  • Spitzinich

    thank you mate!

  • Rweckert

    Thanks for your clear and concise tips on getting the issue resolved.

  • Dazed and Confused

    You Da Man!!!

  • http://twitter.com/dsfadsfgafgf dsfadsfgafgf

    thanks for that. that message was getting annoying 

  • Deep

    thanks buddy, that worked for me cleanly :)

  • http://twitter.com/Murshid Murshid Ahmed

    Wow, thanks. It helped me a lot :)

  • Ybhask

    Thank U.  I have done what you have suggested.   The error “listening sockets not available” continues.

    • Haakon

      Do you sudo when you start the server?
      (Brace for wall of text… :p)

      If you want apache to listen to a port below 1024, it needs root access.
      So if you do “sudo apache2ctl start” it gets root privileges, and can bind to whatever it wants.

      If you just do “apache2ctl start” it doesn’t, and can only bind to unprivileged ports.
      By default apache listens to port 80, which is where http traffic normally goes.

      You can of course change this in /etc/apache2/apache2.conf if you want, but why would you want to do that? You might want to limit it to listen to 127.0.0.1:80, meaning that it will only reply to your computer, so the rest of the world cannot see your webpage.

  • Guest

    Thanks  :)

  • Ravicioso

    Thanks, It worked for me too.

  • Pingback: 몽고DBmongodb setting problem « 살군의 보조기억 장치

  • A1901854

    It works! Thanks.

    But there’s something that doesn’t work. And that’s your website on Chrome. It shows up completely empty. Pasting the full URL in Firefox was the only way to see your page.

    • Aa

      it shows up on chrome .

  • Ybhask

    Every time I boot my computer, I go to the terminal.  The apache2 server is starting only if I type two commands:
    1. sudo netstart -plan | grep ‘:80′
    Then dhttpd using the port 80 appears with its number.
    2. sudo kill xxxx (four digit number).
    Then presumably killing takes place.
    3. sudo /etc/init.d/apache2 start.
    The server says OK and http://localhost/… php file works.

    I have given server’s name as ‘localhost’ to linux dictionary ‘Abc’.  It is working fine.  Is it the dhttpd?  Is it using the port 80?   The dictionary should not work after sudo killing of pid… of the port 80.,   But the dictionary is working.   Which port does it use?  Does it use ‘listen port’?

    Does the dhttpd relate to old apache2s which were purged, installed and reinstalled several times.  Has not the purging taken place 100%?  I am afraid of further purging.   Reason the server which is working now after sudo killing steps described above,  may not work at all. 

    Shall I continue with the sudo netstat -plan and sudo kill procedure?  How long? 

  • İbrahim Gündüz

    Thanks

  • A Senna

    Thanks a lot. Works

  • Alfredthekkan01

    great help. thank you

  • Vutienluc1991

    thanks !

  • Asdf

    Thanks

  • Ajay_0162

    It worked for me.Thanks a lot man :)

  • Greogor Samsa

    well documented working fix, thanks!

  • alfred

    thanks man

  • Marikhu

    Thanks! Worked like a charm.

  • Yoesoff

    you save my time, cool

  • Kumar

    Fantastic !

  • unknown

    thanks a lot.
    ignored that message for month!! but it was so simple ;)

  • vandad raash

    Thank you,my problem has been solved,but the phpmyadmin doesn’t work now.please help me

  • A_bakovic

    When I type ‘sudo gedit /etc…’ it says: Cannot open display. Run gedit –help. Can someone tell me how to fix this?

  • Atsearnaud

    merci beaucoup c’est bon ! ça marche

  • Pingback: Setting up my LAMP development server on Linux Mint 10 :) | Thomas W Bell

  • Tamer Solieman

    Thanks

  • http://www.facebook.com/dylenbrivera Dylen Rivera

    Thanks a lot, fixed my issue right away.

  • Kevin Patience

    kick start will not push down

  • Intonk

    nice..
    Thank you..

  • maruccio

    thanks a lot!

  • Harvey

    Thanks for this tidbit!

  • happie

    thanks a million trillion ….infinite .you made my day ..just trying to fix this for 7 hours finally done thanks thanks thanks

  • isaczaqueu

    i just wanna thank you for your help, and i believe that it will help many too. be blessed in Jesus name

  • Pingback: Open Source ILS: Installation Guide for Koha on Ubuntu 10.04 LTS with MySQL 5 | Researcher's Blog?!?!?!

  • Davidwan

    Nice, I get this problem fixed by this way on my mbp. 

  • Papanya Rizky

    thank you for your help

  • Mmehhadyhassan

    thanx

  • guest

    OH MAN your an apache GOD thank you

  • dave

    WOOOOOOOOO!   (it worked, thanks)

  • Raghu Ram

    Hi,

    I trying to fetch a page using ssl in apache on windows for my ruby on rails applications.
    When i see the logs is get the following errors.
    Starting thread to listen on port 443 but the page is not getting fetched.
    Kindly help me regarding this and also let me know if anything is required from my end regarding logs..

    Quick help is appriciated..
     

  • http://www.facebook.com/profile.php?id=704431416 Daniel G Gutierrez

    Thank you!  That blank file just made me think that the httpd.conf wasn’t used and I started down the failing path of “sites-available” configurations.

  • Anil Nautiyal

    good helpful article.

  • http://www.libandweb.com/ Otuomathegreat

    Thanks, you saved me today

  • Sangeetha Pr

    hey, i am working on Windows Apache 2.2.21 win32 x86 no_ssl and PHP is 5.2.17 Win32 Vc6. 

    I have added these couple of lines in httpd.conf 

    #BEGIN PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALLPHPIniDir “C:/PHP”LoadModule php5_module “C:/PHP/php5apache2_2.dll”#END PHP INSTALLER EDITS – REMOVE ONLY ON UNINSTALL

    I am getting this error 
    ” Could not reliably determine the server’s fully qualified domain name, using 192.168.1.26  for ServerName”
    only one usage of  each socket addressis normally permitted : make_sock could not bind to address 0.0.0.0:80 no listening sockets available , shutting down nowUnable to open logs ”

    Any insights?

    Thanks,
    Sangeetha

    • http://mohamedaslam.com Aslam

      I’m sorry. I don’t use Windows.

    • dufus

      you have IIS installed. remove it. :)

  • Vladimir Hidalgo

    Thanks, and greetings from El Salvador.

    Worked flawlessly for my server at http://www.flor360.com

  • Pitersanchez

    thanks very much

  • http://twitter.com/JoZ3_69 JoZ3

    Thanks friend was exactly what I was looking

  • http://www.facebook.com/franklin.dejesusgomez Franklin DG

     Thank you men

  • Hagit

    Thank you  very much!!!!!!

  • Faiz

    Thank You Najeeb
    hope i could do same for you some day

    Faiz

  • choke91

    Thanks..it works

  • Samuel_guy

    We have a php application coupled with Apache which was facing the same error and your solution helped. Thanks a lot!

  • Daniel Bassa

    thank you, it works for me!

  • Firesenbet

    good job men…thanks it works for me
     

  • Netin

    OTIMO! FUNCIONOU!!!!

  • Aliasgar

    i am using ubuntu and facing problem for FTP server its configured and working properly in localhost but facing problem over internet its not working please help.

  • http://www.mobilecubix.com/ iPhone App Developers

    wow this is amazing and informational to me.

  • http://www.carrotmedia.com/ Facebook App Developer

    I searched this query everywhere the other day, but couldn’t find it. Finally someone has mustered up in a separate post. Thanks alot :)

  • Satish Gupta

    Its working

  • Ankur Keelu

    hey, i am working in ubuntu ….and when am loading this http://localhost/info.php its showing that ”
    Not Found

    The requested URL /info.php was not found on this server.

    Apache/2.2.16 (Ubuntu) Server at 127.0.0.1 Port 80″pls help me out …..

  • Idlesun

    Thanks! Simple and useful.

  • Emerald Hieu

    Wahhh, I found the solution for this problem for months. I can’t believe it’s so easy like that. It doesn’t affect my virtualhosts. It works amazingly! Thank you very much!

  • Ameni Asterie

    i always the same problem when i restart apache2 :
    The Alias directive in /etc/apache2/conf.d/centreon.conf-bak at line 5 will probably never match because it overlaps an earlier Alias.
     

  • Vijay

    Much really helpful……..Thanks

  • Guest

    Thank you!  this was short, to the point and 100% accurate! Love it

  • Paula S.

    Thanks! It saved me.

  • sreedhar

    I AM SREEDHAR PANCHAYAT SECRETARY, I WONT TREASURY BALANCES AND PERCOLATION REPORT EXPENDITURE,RECIERT

  • Ab2003wish

     i really thank you!!

  • http://twitter.com/deanmalmgren Dean Malmgren

    thanks for sharing your fix; definitely came in handy in a pinch.

  • Sonia3994

    i am working on Ubuntu 11.10 in my office ,,but i have a same problem ,at the start up interface ,i can  not access my Ubuntu so what should i do ???
    if i try to login  ,it takes just password ,and then shows the same MSG .

    • Sonia3994

      my computer is the server in my office if any body help please send me the suggestions ,thanks

  • Durim-mata

    Who helps with this problem?  Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, gadi@rounds.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.Apache/2.2.16 Server at app.rounds.com Port 443

  • Anonymous

    your the best

  • Zachariha Robichaud

    SO SIMPLE! thank you worked perfectly!

  • Simo

    merci bcp ca m’a ete util je vous remercie

  • Kashlinux

    thank u very much…. it worked…!

  • Brandi Catt

    t

  • Roserosebild

    i want use the 
    Windows please help me

  • TAss

     Here I tried to open http.conf in ubuntu,  it will displays blank file only can u help me

    • sebasta

      That is common. Add:
      ServerName localhost

      save it, restart and you are fine. LIKE HE SAID. :D

  • rafael

    Thanks man!

  • Semika Siriwardana

    Short and Sweet. Thanks a lot

  • http://www.sinaneldem.com.tr Sinan Eldem

    Worked great for me @ubuntuserver12.04 Thanks.

  • Mr. Black

    Thanks. It works.

  • Mikhail

    Thank you!

  • http://www.facebook.com/profile.php?id=100000477026727 Aymen Ghiloufi

     think you

  • Smidhunraj

    your are awesome dude……….

  • http://www.myscrawls.com/ My Scawls

    Thank you very much! It worked fine.

  • http://twitter.com/MayNankya may ruth nankya

    Thank you. I was greatly helped by this post.

  • Sriram Rangan

    Cool 

  • OsamaBinLogin

    faster way to reboot apache:

    apachectl restart

  • kplulm

    Jazakallah, it worked :) Thanks

  • Rugwiza

    Done. thank you

  • Sunil_Confidential_Mail

    Thanks. Really Your solution for me ,in the time of my need :-)
    Cheers! :-)

  • dherrin

    Thank you this Worked like a charm.

  • ali

    thanks very 10^n ;_)

  • Praneeth

    Finally even me come across you blog!
    Thanks :)

  • rafiu

    thanks.. it helped me…

  • http://www.facebook.com/atheist.man.cosmos Derek Lloyd

    Thanks dude!

  • student

    hey sir. am having trouble with trying to access cgi files using localhost. am using apache2. error 404 NOT FOUND. when i type localhost/cgi-bin/file.cgi

  • http://twitter.com/TimVanDijck Tim Van Dijck

    Simple but quick fix! Thanx!

  • http://www.facebook.com/people/Eric-Jumbo/100003352122962 Eric Jumbo

    Thanks!

  • s_sh

    thanks for your good explanation

  • siva

    i have been trying to solve this problem for the last past 10 hours.finally i found out a guru. Thank you so much for this , i truly am grateful !

    • http://mohamedaslam.com Aslam

      Thanks for your kind words, but I’m not a guru. :-)

  • Pingback: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName | Swarm's Blog

  • Showrav

    Thanks

  • http://twitter.com/s7anley Ján Koščo

    Thanks for great tip.

  • http://www.facebook.com/arpitvaish Arpit Vaish

    I tried this.. though the error is gone .. but I as still not able to run my local host

    • er1c

      I think your post should be more vague. I’m sure you will get since you were soo specific.

  • http://ruetcse10.com/ MD Minhazul Haque

    that was fantastic! WOW! thank you!!!

  • http://www.facebook.com/carmine.rendina.5 Carmine Rendina

    Thanks man! Great!

  • http://www.facebook.com/rusty.weaver.5 Rusty Weaver

    Thank you. Even though I’m not using Ubuntu, this helped.

  • TwoPhasedSomeBits

    Thanks dude! This “error” bugged the crap out of me! Noob linux users like me, are very privileged to have guys like you to help us become better! _O_

  • Oliv

    Thankkkkkkkkks

  • Bouti Adel

    thank you a lot!

  • SamoJst

    one more step (at least in my case) – remove 127.0.1.1 [myCompName] from /etc/hosts

    • n0tquitegnu2this

      that step is optional and irrelivent. It neither causes the problem, nor cures it. I keep mine, because my host is CQ62 and shorter then http://localhost/ :D

  • Stefan K. Nikolov

    it is not working for me… The error still remains :(

  • quest

    not working on ubuntu :)

  • urma94

    Thank you a lot, you’ve just saved me……

  • Guest

    Thanks for your help.

  • Sanan Guliev

    This way do not work

  • http://www.facebook.com/jan.benson.942 Jan Benson

    Was getting really frustrated thanks you save me a whole lot of digging

  • bradley

    thanks!

  • Matt

    THANK YOU!

  • jilguero

    It works

  • IWasHere

    Thanks!

  • Maduka

    Thank you bro, it solve the problem :)

  • hmd

    hi! thank you

  • Naresh

    i have an error in which i have two different type of protocols 1) Secure 2) Unsecure
    in unsecure(https) all the files(php,html etc,,,) working. where as in secure(https) html files are working while php files are not working
    please help me
    i have apache server with centos 6.2 os
    Thank You…..

    • fggjh

      its k

  • DKWings

    Fixed my problem thx!!!!

    • prem

      ok

  • Adam Waite

    Thanks for this.

  • Brian Peterson

    Thank you so much, good sir!

  • dudisoft

    To solve this problem You need set ServerName.

    vim /etc/apache2/conf.d/name

    For example set add ServerName localhost or any other name:

    ServerName localhost

    Restart Apache 2

    service apache restart

    • SivaKarthik

      Thanks dude.. its helped to relsolve the issue.

    • solved

      or (for the solution above) add a “Include httpd.conf” at the end of apache2.conf

    • http://itsabouthockey.com/ Frank

      NICE YOU HAD THE SOLUTION FOR MY PROBLEM THANKS!!!!!!!!!!!!!!

    • Roman

      thanks. this works for me

    • DimmuBoy

      thanx for solution ;)

    • awan

      It works bro!!! Thanks a a lot

    • Errand

      Thank u

  • JACK_G

    Didn’t work for me, I got the same error. I am not sure why, because it seems like it helped everyone else

  • Oliver

    OH MAN your an apache GOD thank you

    no, a good would be known this: sudo gedit /etc/apache2/ht… ( this can destroy perrmissions!

    dont start any grafical Programs with sudo! only use gksudo or kdesudo gedit.

  • jezu

    Thank you!!

  • edson

    thanks so much for the solution

  • Sonia

    :) Nice one – really helped thank you

  • Sanjay

    Thanks ,It worked !!!!!

  • Sisira Somaratne

    Thanks It help me lot

  • siva

    ya Good

  • Tom Vynckier

    Thank you very much!!

  • Cbreezy

    kudos here…thx man you’re a saint, figured I was right in the shit on this one :-)

  • pg

    when i write localhost in the address bar of the browser it shows the error

    Forbidden

    You don’t have permission to access /
    on this server.

    Apache/2.2.22 (Ubuntu) Server at localhost Port 80

    can anyone fix this?

    • http://mohamedaslam.com Aslam

      Did you try with ‘sudo” ?

      • Hakan Aktas

        try what with sudo? apache2 the service already runs with sudo.

        • Casper Bjerggaard Johansen

          just type: chmod -R 777 /var/www/

          • CodeJunkie

            apache2 running as root? with rwx privileges on /var/www for everyone… sounds like suicide!

  • Aslam’s Dad

    Aslam Broda, if you don’t know what apache is then stop lying. You can see the comments, your answers wrong. Did you pass in school by cheating and maybe you cheated wrong.
    Post that is authentic liar. Your piece of shit broda
    This is correct answer:-

    # sh -c ‘echo “ServerName localhost” >> /etc/apache2/conf.d/name’
    OR
    # vim /etc/apache2/conf.d/name
    ServerName localhost
    Now restart.

    hey go back to school craftmans

  • ahlamest

    salam

    bonjour a vous tt s’il vous plait j’ai un probléme au niveau du ocs inventory .

    je suis stagaire et je suis occupe de gerer l’inventaire

    j’ai installer le glpi et sa fonctionne mais quand j’ai installer ocs inventory server et quand je tape ip_serveur/ocsreports in m’affiche le message suivant :

    Forbidden

    You don’t have permission to access /ocsreports on this server.

    Apache/2.2.22 (Ubuntu) Server at “IP_serveur” Port 80

    d’ou vient ce message et comment je peux le résoudre !!!!!!!

  • Saagar Takhi

    easiest way is:

    step 1 ) sudo vim /etc/apache2/apache2.conf

    step 2) add ServerName localhost

    in the very end of the file.

    Note: You can use gedit instead of vim, if u have that.

    #worked for me :)

    • Tatsu

      Worked for me, thanks!

    • Bacem

      Thanks. Only this worked for me.

    • Imam Kusdinar

      it’s worked for me on kali linux, thanks to share and it’s very good :)

    • Guest

      It worked for me too :D

    • Stormbringer

      thanks

  • Rabab

    Thanks a lot

  • Siddhanta

    Thanks its worked for me

  • rk

    Thanks for ur posting its really helpful

  • rajesh

    Thanks for the help in time

  • LinuxFox

    It hasn’t worked for me :( im newish to ubuntu 12.04 LTS ((only operating system on my comp)) ) what should i do next???

  • MickEE

    Worked, thank youI had to add “ServerName localhost” to /etc/apache2/httpd.conf and /etc/apache2/conf.d/name.

  • Sanan Guliev

    Don’t work for me

  • http://www.hollywoodrounder.blogspot.com Mark_in_Hollywood

    Aslam: Hello and thanks, first of all for this work. I have added ServerName localhost into the file and “Include httpd.conf” at the end of the apache2.conf. Yet, on restart of apache2, I get:

    mark@Lexington:/$ apachectl restart

    /usr/sbin/apachectl: 87: ulimit: error setting limit (Operation not permitted)
    apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/example.com: /etc/apache2/sites-enabled/example.com:1: was not closed.
    Action ‘restart’ failed.

    I looked into that file and do not see a so I don’t know where to put . May I beg a little help, please?

  • Greg

    Have installed Apache Server on a windows 7 prof 64bit desktop. Static IP. placed files (HTML5) into appropriate folder went to laptop and typed static IP into URL line of Chrome. It worked! brought up the links and they worked. 15 mins later it stoppped working! Now typing in the the IP address in the URL line gets and ‘Oops’ error from Chrome. Nothing was changed! What gives?

  • Ash

    This sorted my problems, thanks!

  • Leo

    THANK YOU!!!!!!!!!!!!!!!!!!!!!

  • Ajith

    Now also it doesn’t work

  • Eran Or

    #if someone interested. example: create blog.conf in sites-available with the following content and then enable site. :)
    #because the comment change characters you need to replace this: “=”" with /

    ServerName 127.0.0.1

    ServerAlias blog

    DocumentRoot /var/www/Projects/Doo/demos/blog

    DirectoryIndex index.php

    Options Indexes FollowSymLinks

    AllowOverride All

    Allow from All

  • Happeh

    This *(*&Q*Q tutorial doesn’t work in Mint 15 and it is the first one in the Google search results!

    The httpd.conf file has to be created in the conf.d folder, not the apache2 folder.

    To do it his way the apache2.conf file has to be altered to read “ServerName localhost”.

    G$# D*&#! It is only one paragraph long and it is wrong!

    ( ….he grumbles after looking at 100 tutorials of one paragraph in length whose sole purpose is to sucker people in and waste their time for ad hits. )

  • Jenia

    Thank you!

  • carlosspohr

    Works :)

  • сђӓяz®℠

    It works for me. As simple as A B C.. :-)

  • Dan

    Thanks bro! This fixed my 404 problem when trying to access phpmyadmin on a linux server

  • khush

    thanks it works

  • khush

    can u tell me that when my system start my apache2 automatically start
    mean i need not to sart it manually.
    please tell me procedure.

  • Ravi Gupta

    thanks man It helped me.

  • allyssonharry

    for new version of apache “2.4″ only open the file “/etc/apache2/apache2.conf” and type “ServerName localhost”

  • kiash

    Thanks bro! You save me :)

  • Willis

    Thank you

  • Vihari

    Thanks dude

  • JKL

    THANKS , may god bless u

  • guest

    Thank you, helpful to me.

  • Warron

    What causes this problem. Does ServerName have to have localhost as its argument?

  • http://nurudin.jauhari.net/ Jauhari

    Awesome thanks

  • Erik

    Thanks!

  • Saptarshi Nag

    Thanx dude …It helped me lot :)

  • Amanda Mata

    Funcionou perfeitamente! Muito obrigada! Ganhou uma seguidora :)

  • ididdiioyt

    fuck you moron, ERROR ty…

  • Guest 120

    Great ! Thanks !

  • Mikhael Gerbet

    nice !! thx ;)

  • Jadhav

    i have problem with application i have application in java runs on tomcat it is working fine but in one page i have to get message dialog box when i click on button but i did’t get dialog box more over it seems long standing waiting for localhost in progress bar how to fix it

  • http://mohamedaslam.com Aslam

    I’m a firm believer in “Less is more!” :)

    Cheers.

83 Flares Twitter 10 Facebook 44 Google+ 29 Email -- 83 Flares ×