LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2011, 09:18 AM   #1
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Rep: Reputation: 16
configuring apache on linux 10.4


I am installing apache on my linux box using this guide
http://tuxtweaks.com/2010/04/install...04-lucid-lynx/

when i restart the apache I get this error :



Code:
walt@casper:/var/www$ 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
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(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

when i try and test the php I get this in the webserver.

400 Bad Request
Your client has issued a malformed or illegal request.

this is my local host ip
Code:
walt@walt-nasdaq:/var/www$ cat /etc/hosts | grep localhost
127.0.0.1	localhost
::1     localhost ip6-localhost ip6-loopback
walt@walt-nasdaq:/var/www$
 
Old 12-15-2011, 04:10 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
To fix that problem, you need to edit the httpd.conf file.

Code:
#sudo gedit /etc/apache2/httpd.conf
add the following line to the file.
Code:
ServerName localhost
Save the file and exit from gEdit.

restart the server.
Code:
#sudo /etc/init.d/apache2 restart
 
Old 12-15-2011, 10:36 AM   #3
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
I added that to /etc/apache2/httpd.conf, and it did not work. I still get the same error on the PHP test file http://localhost/testing.php/
it contains:

<?php phpinfo(); ?>

keep in mind - - when i type in http://localhost/ I get
It works! (so the webserver is running)

I saw on the FAQ that deleting this file helps ---- setup/.htaccess.

However I cannot find that file.

Does anybody know where that file is?

Last edited by casperdaghost; 12-15-2011 at 10:42 AM.
 
Old 12-15-2011, 08:18 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Any file that starts with a dot is 'hidden' ie normal ls won't see it; use the -a switch
Code:
ls -a

#or

ls -la
 
Old 12-15-2011, 10:59 PM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by casperdaghost View Post
I added that to /etc/apache2/httpd.conf, and it did not work. I still get the same error on the PHP test file http://localhost/testing.php/
it contains:
the solution which I gave was for resolution of your first problem that is apache server and I think it worked

secondly for the PHP error I found this link might be helpful

Installing LAMP on Ubuntu 10.04
 
Old 12-21-2011, 02:07 PM   #6
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Original Poster
Rep: Reputation: 16
My browser asks to download the php file instead of displaying it.
I have already uninstalled and reinstalled libapache2-mod-php5


I got rid of everything php in synaptic.
then reinstalled it with -
sudo apt-get install php5-cli

still wants to download.

Last edited by casperdaghost; 12-21-2011 at 03:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring Apache in Linux for SVN. lakshmi4linux Linux - Newbie 1 03-30-2009 04:44 AM
Installing and Configuring MySQL, Apache, and PHP on (Ubuntu) Linux gagne.marc Linux - Software 4 02-21-2009 04:23 PM
Configuring Virtual Hosts in Apache 2 w/ Mandrake Linux 9.1. bnscomp Linux - Software 3 10-10-2003 01:20 PM
Need a little help configuring apache... tarballed Linux - Software 1 08-30-2003 02:53 PM
Going INSANE with Apache and Configuring my Linux Box biggdady6998 Linux - Software 5 08-11-2003 12:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration