Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OS 10.13 High Sierra Apache listening ports

899 views
Skip to first unread message

JamieCoy

unread,
Sep 27, 2017, 11:29:38 PM9/27/17
to
I'm running into an issue where the config file for Apache has some changes made in listening to ports. Previously I would just enter the ports in the "Listen' section. Now there is an additional section:

<IfDefine SERVER_APP_HAS_DEFAULT_PORTS>
Listen 8080
grab</IfDefine>
<IfDefine !SERVER_APP_HAS_DEFAULT_PORTS>
Listen 80

Previously, I'd just enter

Listen 80
Listen 8102
Listen 8201

What's the proper way to enter these ports in this new configuration?

Sure would be grateful for some assistance. Thanks.

Bruce Esquibel

unread,
Sep 28, 2017, 11:29:19 AM9/28/17
to
JamieCoy <coyle....@gmail.com> wrote:

> What's the proper way to enter these ports in this new configuration?


Have you tried to just gut (delete) those lines with the IfDefine and
/IfDefine in them, leaving just the 3 LISTEN statements you want?

Only guess I have is there is a $20 add-on to High Sierra (macOS Server)
which probably has a configuration area for the apache stuff and likely
some arguement is passed from it to there.

They probably overlooked it on non-server versions and should of removed the
IfDefine lines.

-bruce
b...@ripco.com

Ivan Shmakov

unread,
Sep 28, 2017, 11:45:31 AM9/28/17
to
>>>>> JamieCoy <coyle....@gmail.com> writes:

> I'm running into an issue where the config file for Apache has some
> changes made in listening to ports. Previously I would just enter
> the ports in the "Listen' section. Now there is an additional section:

> <IfDefine SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 8080
> grab</IfDefine>
> <IfDefine !SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 80

> Previously, I'd just enter

> Listen 80 Listen 8102 Listen 8201

> What's the proper way to enter these ports in this new configuration?

Leave the <IfDefine /> sections intact, and put additional
(i. e., other than "Listen 80") ports outside of them; like:

<IfDefine SERVER_APP_HAS_DEFAULT_PORTS>
Listen 8080
[... anything else that happens to be here...]
</IfDefine>
<IfDefine !SERVER_APP_HAS_DEFAULT_PORTS>
Listen 80
[... anything else that happens to be here...]
</IfDefine>
## Put any additional 'Listen' directives below
Listen 8102
Listen 8201

I presume that for some reason they needed a way to switch the
server between :80 and :8080 (perhaps they offer an alternative
HTTP server for :80?), and to that end introduced a new
'SERVER_APP_HAS_DEFAULT_PORTS' configuration option. As your
new ports do /not/ clash with either of their defaults (:80 and
:8080), you can put them anywhere outside these <IfDefine />s.

--
FSF associate member #7257 http://am-1.org/~ivan/ 7D17 4A59 6A21 3D97 6DDB

JamieCoy

unread,
Sep 30, 2017, 3:30:57 PM9/30/17
to
Thanks Ivan - I tried your suggestion but to no avail. My web site requires a web hop that I have via DynDNS. Since my OS update, I have a new IP address for the first time in many months. I checked for open ports on it and the port I designated to be open (8201) via my router is not showing - in fact there are no open ports at all. I'm wondering if since the last time I was assigned an IP address if Comcast policy has changed and closed these ports. Does that sound right to you? Not having that port open explains why Apache can't start up successfully.

I'll do virtually anything to not have to call Comcast to ask about this port, but.... I'd welcome more advice if you're up to it. Thanks again.

Ivan Shmakov

unread,
Sep 30, 2017, 4:02:43 PM9/30/17
to
>>>>> JamieCoy <coyle....@gmail.com> writes:
>>>>> On Thursday, September 28, 2017 at 8:45:31 AM UTC-7, Ivan Shmakov wrote:

[...]

>> Leave the <IfDefine /> sections intact, and put additional (i. e.,
>> other than "Listen 80") ports outside of them; like:

[...]

> Thanks Ivan - I tried your suggestion but to no avail. My web site
> requires a web hop that I have via DynDNS.

Do you mean "reverse proxy" or just a DNS name for a "dynamic" IP?

(It's been years since I've last used DynDNS.)

> Since my OS update, I have a new IP address for the first time in
> many months. I checked for open ports on it and the port I
> designated to be open (8201) via my router is not showing - in fact
> there are no open ports at all.

I suppose you should check ports open on the server first, like
the following. (That's for GNU/Linux; don't know if that'd work
on your system.)

$ netstat -ln | grep -F -- :80
tcp6 0 0 :::80 :::* LISTEN
$

If you use private (RFC 1918) IPv4 addresses in your network,
you can also try to connect to the server using such an address
(with a browser, Wget, cURL, etc.)

> I'm wondering if since the last time I was assigned an IP address if
> Comcast policy has changed and closed these ports. Does that sound
> right to you? Not having that port open explains why Apache can't
> start up successfully.

The ISP policy changes could've prevented your server from being
accessed from the "outside," but I see no way they would've been
of any hindrance to its starting up.

I suggest that you check the server's logs (ErrorLog,
specifically) for any clues. And also:

# apachectl configtest

[...]

JamieCoy

unread,
Oct 2, 2017, 12:08:21 AM10/2/17
to
I have run the configtest and it's coming up with MANY errors, mostly in modules saying they're already loaded but a very curious one about a syntax error in line 551....and that line's syntax has not changed from the previous version! If you will indulge me, would you mind taking a look at this rather lengthy configtest results?....I'm well and truly stumped now. Thanks

Jerry Stuckle

unread,
Oct 2, 2017, 10:58:50 AM10/2/17
to
Before worrying about line 551, get your other errors fixed first. If
modules are being loaded twice, comment out the second load (or surround
it with <Ifmodule !modname>...</Ifmodule> conditionals.

Once you do that, look at any other errors you have and fix them,
starting with the first.

Just because a line syntax hasn't changed doesn't mean it's not a
problem. For instance, that particular command may have been deleted, a
module may not be loaded or lots of other things.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

JamieCoy

unread,
Oct 2, 2017, 11:02:39 PM10/2/17
to
HI Jerry - I see no instance of a module being double loaded in the httpd.conf file. This is why I'm so stymied. Thanks!


LoadModule authn_file_module libexec/apache2/mod_authn_file.so
#LoadModule authn_dbm_module libexec/apache2/mod_authn_dbm.so
#LoadModule authn_anon_module libexec/apache2/mod_authn_anon.so
#LoadModule authn_dbd_module libexec/apache2/mod_authn_dbd.so
#LoadModule authn_socache_module libexec/apache2/mod_authn_socache.so
LoadModule authn_core_module libexec/apache2/mod_authn_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so
LoadModule authz_user_module libexec/apache2/mod_authz_user.so
#LoadModule authz_dbm_module libexec/apache2/mod_authz_dbm.so
#LoadModule authz_owner_module libexec/apache2/mod_authz_owner.so
#LoadModule authz_dbd_module libexec/apache2/mod_authz_dbd.so
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
#LoadModule authnz_ldap_module libexec/apache2/mod_authnz_ldap.so
LoadModule access_compat_module libexec/apache2/mod_access_compat.so
LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so
#LoadModule auth_form_module libexec/apache2/mod_auth_form.so
#LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so
#LoadModule allowmethods_module libexec/apache2/mod_allowmethods.so
#LoadModule file_cache_module libexec/apache2/mod_file_cache.so
#LoadModule cache_module libexec/apache2/mod_cache.so
#LoadModule cache_disk_module libexec/apache2/mod_cache_disk.so
#LoadModule cache_socache_module libexec/apache2/mod_cache_socache.so
#LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so
#LoadModule socache_dbm_module libexec/apache2/mod_socache_dbm.so
#LoadModule socache_memcache_module libexec/apache2/mod_socache_memcache.so
#LoadModule watchdog_module libexec/apache2/mod_watchdog.so
#LoadModule macro_module libexec/apache2/mod_macro.so
#LoadModule dbd_module libexec/apache2/mod_dbd.so
#LoadModule dumpio_module libexec/apache2/mod_dumpio.so
#LoadModule echo_module libexec/apache2/mod_echo.so
#LoadModule buffer_module libexec/apache2/mod_buffer.so
#LoadModule data_module libexec/apache2/mod_data.so
#LoadModule ratelimit_module libexec/apache2/mod_ratelimit.so
LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so
#LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so
#LoadModule request_module libexec/apache2/mod_request.so
#LoadModule include_module libexec/apache2/mod_include.so
LoadModule filter_module libexec/apache2/mod_filter.so
#LoadModule reflector_module libexec/apache2/mod_reflector.so
#LoadModule substitute_module libexec/apache2/mod_substitute.so
#LoadModule sed_module libexec/apache2/mod_sed.so
#LoadModule charset_lite_module libexec/apache2/mod_charset_lite.so
#LoadModule deflate_module libexec/apache2/mod_deflate.so
#LoadModule xml2enc_module libexec/apache2/mod_xml2enc.so
#LoadModule proxy_html_module libexec/apache2/mod_proxy_html.so
#LoadModule proxy_html_module libexec/apache2/mod_proxy_html.so
LoadModule mime_module libexec/apache2/mod_mime.so
#LoadModule ldap_module libexec/apache2/mod_ldap.so
LoadModule log_config_module libexec/apache2/mod_log_config.so
#LoadModule log_debug_module libexec/apache2/mod_log_debug.so
#LoadModule log_forensic_module libexec/apache2/mod_log_forensic.so
#LoadModule logio_module libexec/apache2/mod_logio.so
LoadModule env_module libexec/apache2/mod_env.so
#LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so
#LoadModule expires_module libexec/apache2/mod_expires.so
LoadModule headers_module libexec/apache2/mod_headers.so
#LoadModule usertrack_module libexec/apache2/mod_usertrack.so
##LoadModule unique_id_module libexec/apache2/mod_unique_id.so
LoadModule setenvif_module libexec/apache2/mod_setenvif.so
LoadModule version_module libexec/apache2/mod_version.so
#LoadModule remoteip_module libexec/apache2/mod_remoteip.so
#LoadModule proxy_module libexec/apache2/mod_proxy.so
#LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so
#LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so
#LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
#LoadModule proxy_fcgi_module libexec/apache2/mod_proxy_fcgi.so
#LoadModule proxy_scgi_module libexec/apache2/mod_proxy_scgi.so
#LoadModule proxy_fdpass_module libexec/apache2/mod_proxy_fdpass.so
#LoadModule proxy_wstunnel_module libexec/apache2/mod_proxy_wstunnel.so
#LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so
#LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so
#LoadModule proxy_express_module libexec/apache2/mod_proxy_express.so
#LoadModule proxy_hcheck_module libexec/apache2/mod_proxy_hcheck.so
#LoadModule session_module libexec/apache2/mod_session.so
#LoadModule session_cookie_module libexec/apache2/mod_session_cookie.so
#LoadModule session_dbd_module libexec/apache2/mod_session_dbd.so
LoadModule slotmem_shm_module libexec/apache2/mod_slotmem_shm.so
#LoadModule slotmem_plain_module libexec/apache2/mod_slotmem_plain.so
#LoadModule ssl_module libexec/apache2/mod_ssl.so
#LoadModule dialup_module libexec/apache2/mod_dialup.so
LoadModule http2_module libexec/apache2/mod_http2.so
#LoadModule lbmethod_byrequests_module libexec/apache2/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module libexec/apache2/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_bybusyness_module libexec/apache2/mod_lbmethod_bybusyness.so
##LoadModule lbmethod_heartbeat_module libexec/apache2/mod_lbmethod_heartbeat.so
LoadModule unixd_module libexec/apache2/mod_unixd.so
#LoadModule heartbeat_module libexec/apache2/mod_heartbeat.so
#LoadModule heartmonitor_module libexec/apache2/mod_heartmonitor.so
#LoadModule dav_module libexec/apache2/mod_dav.so
LoadModule status_module libexec/apache2/mod_status.so
LoadModule autoindex_module libexec/apache2/mod_autoindex.so
#LoadModule asis_module libexec/apache2/mod_asis.so
#LoadModule info_module libexec/apache2/mod_info.so
#LoadModule cgi_module libexec/apache2/mod_cgi.so
#LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so
#LoadModule dav_lock_module libexec/apache2/mod_dav_lock.so
#LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
LoadModule negotiation_module libexec/apache2/mod_negotiation.so
LoadModule dir_module libexec/apache2/mod_dir.so
#LoadModule imagemap_module libexec/apache2/mod_imagemap.so
#LoadModule actions_module libexec/apache2/mod_actions.so
#LoadModule speling_module libexec/apache2/mod_speling.so
#LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule alias_module libexec/apache2/mod_alias.so
#LoadModule rewrite_module libexec/apache2/mod_rewrite.so
#LoadModule php7_module libexec/apache2/libphp7.so
#LoadModule perl_module libexec/apache2/mod_perl.so
LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so

Ivan Shmakov

unread,
Oct 3, 2017, 11:30:43 AM10/3/17
to
>>>>> JamieCoy <coyle....@gmail.com> writes:
>>>>> On Saturday, September 30, 2017 at 1:02:43 PM UTC-7, Ivan Shmakov wrote:

[...]

>> I suggest that you check the server's logs (ErrorLog, specifically)
>> for any clues. And also:

>> # apachectl configtest

> I have run the configtest and it's coming up with MANY errors, mostly
> in modules saying they're already loaded but a very curious one about
> a syntax error in line 551... and that line's syntax has not changed
> from the previous version! If you will indulge me, would you mind
> taking a look at this rather lengthy configtest results?... I'm well
> and truly stumped now.

I /can/ take a look, so long as you can publish it somewhere I can
see (say, http://pastebin.ca/.) I cannot promise I'd be able to
actually help with it, though.

Jerry Stuckle

unread,
Oct 3, 2017, 2:41:25 PM10/3/17
to
<snip>

Well the Apache configuration thinks there is, and I haven't found it to
be wrong. You could have other files included in your httpd.conf (very
common in some distros) or some modules were compiled into Apache.

Lots of possibilities here - just because you don't see the same modules
listed in your LoadModule statements in your httpd.conf file doesn't
mean they aren't being loaded multiple times.

JamieCoy

unread,
Oct 13, 2017, 9:30:14 PM10/13/17
to
On Tuesday, October 3, 2017 at 11:41:25 AM UTC-7, Jerry Stuckle wrote:
> On 10/2/2017 11:02 PM, JamieCoy wrote:
> > On Monday, October 2, 2017 at 7:58:50 AM UTC-7, Jerry Stuckle wrote:
> >> On 10/2/2017 12:08 AM, JamieCoy wrote:
> >>> On Saturday, September 30, 2017 at 1:02:43 PM UTC-7, Ivan Shmakov wrote:
> >>>>>>>>> JamieCoy rites:
> >> ==================
> >
> > HI Jerry - I see no instance of a module being double loaded in the httpd.conf file. This is why I'm so stymied. Thanks!
> >
> >
> <snip>
>
> Well the Apache configuration thinks there is, and I haven't found it to
> be wrong. You could have other files included in your httpd.conf (very
> common in some distros) or some modules were compiled into Apache.
>
> Lots of possibilities here - just because you don't see the same modules
> listed in your LoadModule statements in your httpd.conf file doesn't
> mean they aren't being loaded multiple times.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> j
> ==================

Okay, I was able to find a mistake in my httpd.conf file and the syntax all works fine now - however, the folks at DynDNS tell me that the port I need opened, 8201, is not in fact open, even though I have changed nothing on my router - same static address on the same router, same open ports, same everything. Is my router giving up the ghost, or does Comcast block these ports now? They SAY they don't, but I'm stymied here....

Jerry Stuckle

unread,
Oct 13, 2017, 9:57:40 PM10/13/17
to
I have no idea. I'm not on your system and my crystal ball is broken.
You need to do some troubleshooting on your system.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

JamieCoy

unread,
Oct 18, 2017, 3:04:18 PM10/18/17
to
> ==================

Thanks - I've already tried, but no revelations. My router is working fine aside from not being able to open the needed port. Does the port not open until the service is running? In other words, would port 8201 not show as open until Apache is successfully running, or should it be open prior to that? Thanks again.

Jerry Stuckle

unread,
Oct 18, 2017, 11:28:19 PM10/18/17
to
A port is open only if someone opens it. Typically that is some
application (although a kernel module could open it). If the port is
open before Apache is running, some other application has opened it.
This will cause an error when Apache tries to open it.

You can always telnet to the port to see if it's open or not. If it's
open, you will be able to connect (although you may not be able to do
anything else). If the port is not open, your connect attempt will fail.

Trying this from different locations should give you a better idea what
is blocking the communications. You need to start at the system running
Apache and work out from there.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

JamieCoy

unread,
Oct 20, 2017, 12:11:16 AM10/20/17
to
So it would appear that since Apache isn't opening, that it isn't opening the needed port. I've confirmed the it is running, and also that the site cannot be accessed from anywhere. I am indeed working from the machine that's running Apache. At least I now know that the problem is one of two things - either my httpd.conf file is corrupt (the syntax comes up as correct now), OR my five year old Apple Express Router is giving up the ghost and can't open ports correctly. Thanks again for your help!

Jerry Stuckle

unread,
Oct 20, 2017, 11:54:30 AM10/20/17
to
The real question here is - can you access it from that machine? You
need to be able to do that before you can access it from another one.

And there are other possibilities, also. Yes, despite not having any
errors, your Apache configuration may not be set up correctly. Or you
may have a firewall on your machine not allowing traffic to the port.
Or your router may not be set up to properly forward packets from
outside of your LAN to your machine. Or any of a number of possibilities.

But it all starts with being able to access your server from the server
itself. Then moving out from there.

JamieCoy

unread,
Oct 22, 2017, 4:01:36 PM10/22/17
to
> >> ==================
> >
> > So it would appear that since Apache isn't opening, that it isn't opening the needed port. I've confirmed the it is running, and also that the site cannot be accessed from anywhere. I am indeed working from the machine that's running Apache. At least I now know that the problem is one of two things - either my httpd.conf file is corrupt (the syntax comes up as correct now), OR my five year old Apple Express Router is giving up the ghost and can't open ports correctly. Thanks again for your help!
> >
>
> The real question here is - can you access it from that machine? You
> need to be able to do that before you can access it from another one.
>
> And there are other possibilities, also. Yes, despite not having any
> errors, your Apache configuration may not be set up correctly. Or you
> may have a firewall on your machine not allowing traffic to the port.
> Or your router may not be set up to properly forward packets from
> outside of your LAN to your machine. Or any of a number of possibilities.
>
> But it all starts with being able to access your server from the server
> itself. Then moving out from there.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
>
> ==================

I can't access the site from my own Mac, the same one that is ostensibly running Apache. No other computer in the house can access it either.

I'm wondering if there's some module I had to enable in this version which previous versions have not required....that happened once before in a previous Apache update.

The other possibility is that the httpd.conf file is corrupt, even though it passes the syntax test - and then finally there's the router - it has the exact same configuration it always has had when Apache has been working. And it's still doing its DHCP thing just fine, it's just that the port isn't opening. The port I opened for screen sharing IS working, so I'm less inclined now to think that the router is failing.

And the mystery continues...thanks again for your help. It is very much appreciated.

JamieCoy

unread,
Oct 22, 2017, 4:03:49 PM10/22/17
to
Oh, one more thought - the web site whatismyip.com now reports only my ipv6 address. Could it be that ipv6 is preventing the ipv4 configuration from working? I don't really know much about ipv6, but does it's being active necessitate some other kind of configuration on my router? Just a thought...

Jerry Stuckle

unread,
Oct 22, 2017, 6:21:53 PM10/22/17
to
If you can't access it from the system that it's running on, you won't
be able to access it from anywhere else, either. Is your mac the system
you installed Apache on? What messages do you get when you start
Apache? What do you see in the Apache error log?

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

Jerry Stuckle

unread,
Oct 22, 2017, 6:26:21 PM10/22/17
to
It all depends on how you configured your system. IPV4 and IPV6 can
coexist. But if you disabled IPV4 when you enabled IPV6, that's not true.

It could also be many other things, but remember that whatismyip.com and
other external sites see your external IP address. This is almost never
the same the IP addresses on your LAN.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

JamieCoy

unread,
Oct 22, 2017, 10:26:54 PM10/22/17
to
> ==================

So, my error logs shows nothing newer than Oct 14th. I discovered that my Server Root was different from my previous config, so obviously that was a BIG problem :) I never disabled IPV4, so presumably that's not a problem.

I am showing (again) some syntax errors, largely in the "Listen" command. Previously, I just entered "Listen 8201" and stuff worked - now there are a lot of <IfDevine> stuff in that are of the configuration, and I think I've got it screwed up. Please let me know what you think. Is this wrong and if so what do you think I need to do? Thanks yet again.


<IfDefine> Listen 8201
</IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
Listen 8201
<IfDefine>
</IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
Listen 80
</IfDefine>

Kees Nuyt

unread,
Oct 23, 2017, 11:26:58 AM10/23/17
to
On Sun, 22 Oct 2017 19:26:39 -0700 (PDT), JamieCoy
<coyle....@gmail.com> wrote:

>
>I am showing (again) some syntax errors, largely in the "Listen" command. Previously, I just entered "Listen 8201" and stuff worked - now there are a lot of <IfDevine> stuff in that are of the configuration, and I think I've got it screwed up. Please let me know what you think. Is this wrong and if so what do you think I need to do? Thanks yet again.
>
>
> <IfDefine> Listen 8201
> </IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 8201
> <IfDefine>
> </IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 80
> </IfDefine>

Use the syntax as proposed in this thread by

Ivan Shmakov <iv...@siamics.net>
Date: Thu, 28 Sep 2017 15:45:29 +0000
Message-ID: <87wp4iy...@violet.siamics.net>

or consult the syntax rules in a manual, e.g. at

http://httpd.apache.org/docs/2.4/mod/core.html#ifdefine

--
Regards,
Kees Nuyt

Jerry Stuckle

unread,
Oct 23, 2017, 3:38:53 PM10/23/17
to
On 10/22/2017 10:26 PM, JamieCoy wrote:
>
> So, my error logs shows nothing newer than Oct 14th. I discovered that my Server Root was different from my previous config, so obviously that was a BIG problem :) I never disabled IPV4, so presumably that's not a problem.
>
> I am showing (again) some syntax errors, largely in the "Listen" command. Previously, I just entered "Listen 8201" and stuff worked - now there are a lot of <IfDevine> stuff in that are of the configuration, and I think I've got it screwed up. Please let me know what you think. Is this wrong and if so what do you think I need to do? Thanks yet again.
>
>
> <IfDefine> Listen 8201
> </IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 8201
> <IfDefine>
> </IfDefine> SERVER_APP_HAS_DEFAULT_PORTS>
> Listen 80
> </IfDefine>
>

No, this not at all correct. As Kees said - start with Ivan's syntax.
Then continue by looking at the manual. If you're going to run a
server, you NEED to understand how to properly code your httpd.conf.
Otherwise even if you get it working you can leave your site open to all
kinds of attacks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

JamieCoy

unread,
Nov 8, 2017, 12:48:15 AM11/8/17
to
> ==================

So part of my problem was I had a bad hard drive! Now, having most of my stuff restored, I'm on my way back to getting my site back up. As of now, I'm at least getting "It works!" when firing up Apache, but not the content of my site. I'm using the Document Root location as /Library/WebServer/Documents" with an added folder "htdocs" so the full path is /Library/WebServer/Documents/htdocs. This is not where I had the documents before - so perhaps that's why the content isn't being served up. Is the "WebServer" directory ONLY for a local http site? Should I be serving up from another location? I feel like I'm really close to getting this thing back together, but I think the real issue here is the Document Root location. Thanks for any help you folks could provide. Thanks.

Kees Nuyt

unread,
Nov 8, 2017, 7:49:44 PM11/8/17
to
On Tue, 7 Nov 2017 21:48:13 -0800 (PST), JamieCoy
<coyle....@gmail.com> wrote:

> So part of my problem was I had a bad hard drive! Now,
> having most of my stuff restored, I'm on my way back to
> getting my site back up. As of now, I'm at least getting
> "It works!" when firing up Apache, but not the content of my
> site. I'm using the Document Root location as
> /Library/WebServer/Documents" with an added folder "htdocs"
> so the full path is /Library/WebServer/Documents/htdocs.
> This is not where I had the documents before - so perhaps
> that's why the content isn't being served up. Is the
> "WebServer" directory ONLY for a local http site? Should I
> be serving up from another location? I feel like I'm really
> close to getting this thing back together, but I think the
> real issue here is the Document Root location. Thanks for
> any help you folks could provide.

Getting DocumentRoot right is essential.

Are you sure /Library/WebServer/Documents/htdocs is the real,
absolute path to your .html files?
I have no idea of OS X naming conventions.

It might be as simple as forgetting to restart Apache after
editing configuration files...

> Thanks.
--
Regards,
Kees Nuyt

JamieCoy

unread,
Nov 9, 2017, 1:34:15 AM11/9/17
to
On Wednesday, November 8, 2017 at 4:49:44 PM UTC-8, Kees Nuyt wrote:
> On Tue, 7 Nov 2017 21:48:13 -0800 (PST), JamieCoy
It is indeed the path I'm currently using, and I did restart Apache after every edit to html.conf Thanks.

Kees Nuyt

unread,
Nov 9, 2017, 7:46:59 AM11/9/17
to
Ok, next question: does Apache use the config file you edit?
There might be a default config somewhere else.
Look at the command line of the running instance to check it.

Also, this newsgroup is not very active, you may get better
answers in the mailing list.

Send a message to subscribe:
To: users-s...@httpd.apache.org
Subject: subscribe
From: JamieCoy <coyle....@gmail.com>

--
Regards,
Kees Nuyt

JamieCoy

unread,
Nov 11, 2017, 12:42:37 AM11/11/17
to
On Thursday, November 9, 2017 at 4:46:59 AM UTC-8, Kees Nuyt wrote:
> On Wed, 8 Nov 2017 22:34:13 -0800 (PST), JamieCoy
>
> --
> Regards,
> Kees Nuyt

Thanks Kees, but I'm not altogether sure how to find out that Apache is using my http.conf file. Could you le the know how to do this? As far as I know there is only one instance of a httpd.conf file in OSX. What is confusing though, is that there is a "Sites" folder within my user folder, but there is also a "WebServer" folder within the root Library - in the past, that is where I've been able to serve up my site from . Now, no matter which folder I point to in httpd.conf, I only get "It Works!" Very confusing. Thank you for your help, though!

Kees Nuyt

unread,
Nov 11, 2017, 5:28:20 AM11/11/17
to
> Thanks Kees, but I'm not altogether sure how to find out
> that Apache is using my http.conf file. Could you le the
> know how to do this? As far as I know there is only one
> instance of a httpd.conf file in OSX. What is confusing
> though, is that there is a "Sites" folder within my user
> folder, but there is also a "WebServer" folder within the
> root Library - in the past, that is where I've been able to
> serve up my site from . Now, no matter which folder I point
> to in httpd.conf, I only get "It Works!" Very confusing.

I am not familiar with Mac OS X.
There is a lot of information on the web.
For example (warning: URLs might wrap):

https://discussions.apple.com/docs/DOC-12034
https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps
https://coolestguidesontheplanet.com/set-up-virtual-hosts-in-apache-on-macos-high-sierra-10-13/
https://apple.stackexchange.com/questions/95660/how-to-fix-403-in-mac-os-x-built-in-apache

I think the last two discusses the problem you have.

Search for
OS X High Sierra Apache configuration
in yoyr favourite search engine to find many more.

Hope this helps.
--
Regards,
Kees Nuyt

Bruce Esquibel

unread,
Nov 11, 2017, 10:39:17 AM11/11/17
to
JamieCoy <coyle....@gmail.com> wrote:

> Thanks Kees, but I'm not altogether sure how to find out that Apache is
> using my http.conf file. Could you le the know how to do this? As far as
> I know there is only one instance of a httpd.conf file in OSX. What is
> confusing though, is that there is a "Sites" folder within my user folder,
> but there is also a "WebServer" folder within the root Library - in the
> past, that is where I've been able to serve up my site from . Now, no
> matter which folder I point to in httpd.conf, I only get "It Works!" Very
> confusing. Thank you for your help, though!


Wouldn't from the command line doing:

apachectl -V

do it?

-D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"

-bruce
b...@ripco.com

JamieCoy

unread,
Nov 12, 2017, 4:29:01 PM11/12/17
to
On Saturday, November 11, 2017 at 7:39:17 AM UTC-8, Bruce Esquibel wrote:
Thanks, yes it all comes up correctly. There has to be something I'm missing in the DirectoryRoot config...I think I know what is is, though...I'll report back if I was successful. Thanks again for your great help!

JamieCoy

unread,
Nov 15, 2017, 5:00:02 PM11/15/17
to
On Saturday, November 11, 2017 at 7:39:17 AM UTC-8, Bruce Esquibel wrote:
Thank you all - I found the error in my httpd.conf file and all is well now. I appreciate the help.
0 new messages