I have ubuntu 11.04 and my apache was running on localhost but I tried to install varnish and have a ride on varnish . So I followed this tutorial and made changes. But after install I saw apache is not running on localhost. When I gave localhost:8008 it was okay. Now I removed varnish and made changes to the port 8008 to 80, but still apache is running on 8008 port.My default sites configuration is like this

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride all
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

I just want to run apache in default port. When I made the apche restart it showed an error like this

[warn] NameVirtualHost *:8008 has no VirtualHosts
httpd (pid 12174) already running
link|improve this question
More of the httpd.conf would help, somewhere along the lines should be a directive setting the port to 8008. Might very well be in an Include file. – Oldskool Jan 26 at 10:00
feedback

migrated from stackoverflow.com Jan 27 at 9:23

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 3 down vote accepted

Ihis is the file you are looking for:

$ sudo vi /etc/apache2/ports.conf

In this file, change LISTEN 80

link|improve this answer
Thanks Ravi..Finally it worked for me. – newuser Jan 26 at 9:59
feedback

Somewhere in your Apache config is the line:

Listen 8008

That specifies the port Apache listens on.

link|improve this answer
I searched it but there was nothing like that – newuser Jan 26 at 9:50
feedback

Your Answer

 
or
required, but never shown