LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-08-2006, 03:34 PM   #1
sdmike6
Member
 
Registered: Mar 2006
Distribution: Ubuntu, Gentoo, OpenBSD
Posts: 43

Rep: Reputation: 15
Apache2 help


I installed Apache2 on Unubuntu Dapper and I changed the port.conf file to listen on port 8080(because my ISP blocks port 80)

I couldn't figure out how to restart apache so I rebooted and Apache didn't start automatically. So I started apache and it gave me this:

jack@jack-desktop:~$ apache2ctl start
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:8080
no listening sockets available, shutting down
Unable to open logs


All I wonna do is make my webpage public. So what am I doing wrong here?
 
Old 08-09-2006, 07:15 AM   #2
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
Quote:
Originally Posted by sdmike6
I installed Apache2 on Unubuntu Dapper and I changed the port.conf file to listen on port 8080(because my ISP blocks port 80)

I couldn't figure out how to restart apache so I rebooted and Apache didn't start automatically. So I started apache and it gave me this:

jack@jack-desktop:~$ apache2ctl start
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:8080
no listening sockets available, shutting down
Unable to open logs


All I wonna do is make my webpage public. So what am I doing wrong here?
can you paste the result of the following command:-

grep "Listen" httpd.conf

Regards,
Rahul
 
Old 08-09-2006, 01:48 PM   #3
sdmike6
Member
 
Registered: Mar 2006
Distribution: Ubuntu, Gentoo, OpenBSD
Posts: 43

Original Poster
Rep: Reputation: 15
I get no such file or directory.

but I can visually see the content in the httpd.conf file.
 
Old 08-10-2006, 01:09 AM   #4
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
Quote:
Originally Posted by sdmike6
I get no such file or directory.

but I can visually see the content in the httpd.conf file.

Thats because you did not ran this command in the directory where httpd.conf is located. Firstly, try to find the directory where httpd.conf is located. Go into that directory and then run this command. Moreover, if you can visually see the file then try to locate the keyword

Listen

in the file and paste me the same in this thread.
 
Old 08-11-2006, 01:44 AM   #5
sdmike6
Member
 
Registered: Mar 2006
Distribution: Ubuntu, Gentoo, OpenBSD
Posts: 43

Original Poster
Rep: Reputation: 15
jack@jack-laptop:~$ sudo gedit /etc/apache2/ports.conf
jack@jack-laptop:~$ cd /etc/apache2/
jack@jack-laptop:/etc/apache2$ grep "Listen" httpd.conf
jack@jack-laptop:/etc/apache2$ grep "Listen" httpd.conf
jack@jack-laptop:/etc/apache2$

This is what I got.
 
Old 08-11-2006, 01:52 AM   #6
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
run this command

locate httpd.conf

This will allow you to find the httpd.conf file. Then go into the directory where httpd.conf is located and then search for the text "Listen" in httpd.conf.
Listen tag in httpd.conf is used to listen for the incoming connections on a specific port.

If your IP address of webserver is, say xxx.xxx.xxx.xxx. then for apache to start the configuration in httpd.conf should be

Listen xxx.xxx.xxx.xxx:8080


127.0.0.1 is the local ip address, you need a static ip address provided by your ISP for hosting your webpage. The static IP address needs to be provided in xxx.xxx.xxx.xxx format for "Listen" tag

Last edited by rahulk; 08-11-2006 at 01:54 AM.
 
Old 08-12-2006, 10:29 PM   #7
sdmike6
Member
 
Registered: Mar 2006
Distribution: Ubuntu, Gentoo, OpenBSD
Posts: 43

Original Poster
Rep: Reputation: 15
There isn't much in that file. All I see is this.

# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so
 
Old 08-14-2006, 11:08 AM   #8
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
Ubuntu divides the configuration files up to allow individually managed virtual hosts.

Updating the entry in ports.conf is correct. The rest of the configuration is moved from httpd.conf to apache.conf, and the individual sites are in sites-available and sites-enabled.
With a standard install the default entry which should appear in both of these (using a link) should be fine.

You should not have to worry about the "Could not determine the server's fully qualified domain name", that should not prevent the server from running. It is used so that Apache knows how to create fullyqualified internal links, but these are rarely needed.

The relevant error is "Address already in use", which appears to indicate that the port 8080 has already been used by another process.

To see if something is already running on that port run
Code:
$ sudo netstat -an --program | grep 8080
You may get a reply
Code:
tcp6       0      0 :::8080                   :::*                    LISTEN     18079/apache2
which shows that apache is running on that port.

If you find something else (e.g. a proxy server, or another application with a web configuration panel), then you will need to remove it, or change the port number that it uses.

You should then be able to start apache:
Code:
sudo /etc/init.d/apache2 start
then point your web browser at http://127.0.0.1:8080
 
  


Reply



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
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 08:09 PM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM
Apache2 apache2-common WebDav timgerr Linux - Networking 1 08-25-2005 09:41 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM
A little help with apache2 FearPasion710 Linux - Software 1 10-12-2003 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:09 AM.

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
Open Source Consulting | Domain Registration