LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache2 help (https://www.linuxquestions.org/questions/linux-server-73/apache2-help-472064/)

sdmike6 08-08-2006 03:34 PM

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?

rahulk 08-09-2006 07:15 AM

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

sdmike6 08-09-2006 01:48 PM

I get no such file or directory.

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

rahulk 08-10-2006 01:09 AM

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.

sdmike6 08-11-2006 01:44 AM

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.

rahulk 08-11-2006 01:52 AM

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

sdmike6 08-12-2006 10:29 PM

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

penguintutor 08-14-2006 11:08 AM

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


All times are GMT -5. The time now is 04:37 AM.