httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kees Nuyt <k.n...@zonnet.nl>
Subject Re: [users@httpd] Address already in use in Apache on Mac
Date Sun, 20 Mar 2016 12:23:23 GMT
On Sat, 19 Mar 2016 13:29:02 +0100, you wrote:

>   Looks like a nice idea ! To this end, I edited "Listen 80" to
> "Listen 8080" in httpd.conf, but then I got a more laconic and
> surprising behavior :
>
> $ sudo bin/apachectl -k restart
> httpd not running, trying to start
> $ sudo bin/apachectl -k start
> httpd (pid 2823) already running

bin/apachectl is meant to handle the default httpd installation.
It will use the system default conf files.
You could modify the apachectl in your personal installation and call
that instead.
man apachectl will tell you what to do.

You should be able to stop the default httpd instance with:
sudo bin/apachectl -k stop to get rid of the occupied port 80. 

> But when I type http://localhost or http://localhost:8080 in my
> browser, I still get the 403:Forbidden> If I type http://example.com:8080
> in my browser (because of the line
> ServerName www.example.com:8080 in my httpd.conf), it gets stuck (the
> loading takes forever, and the browser eventually gives up with a "too
> long to respond" message).

The ServerName directive does not magically create a DNS record.

www.example.com is an example domain, it listens on port 80, and
index.html works fine on it. Today, it resolves to IP addresses:

$ nslookup www.example.com
Name:      www.example.com
Address 1: 2606:2800:220:1:248:1893:25c8:1946
Address 2: 93.184.216.34

You can override the address by adding an entry to /etc/hosts .

-- 
Regards,
Kees Nuyt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message