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? |
Quote:
grep "Listen" httpd.conf Regards, Rahul |
I get no such file or directory.
but I can visually see the content in the httpd.conf file. |
Quote:
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. |
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. |
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 |
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 |
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 Code:
tcp6 0 0 :::8080 :::* LISTEN 18079/apache2 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 |
All times are GMT -5. The time now is 04:37 AM. |